Skip to content

Conversation

@Mauler125
Copy link
Collaborator

Page buffer isn't sorted per slab, but in the order they are created (they must retain like this as well for pointer conversions done in the runtime). However, we never accounted for this when padding out slabs and pages causing them to be padded out incorrectly as the prior page could belong to a different slab. Code now tracks to which slab the page belongs and independently handles the alignment thereof. Paks generated by RePak are now identical to retail.

Also added a guard to make sure we never allocate more than 20 slabs, as this is the limit of what the runtime can have.
Paks generated with this fix now correctly pass all the debug validation checks implemented in the latest RSX build.

Page buffer isn't sorted per slab, but in the order they are created (they must retain like this as well for pointer conversions done in the runtime). However, we never accounted for this when padding out slabs and pages causing them to be padded out incorrectly as the prior page could belong to a different slab. Code now tracks to which slab the page belongs and independently handles the alignment thereof. Paks generated by RePak are now identical to retail.
Make sure we never allocate more than 20 slabs, as this is the limit of what the runtime can have.
@r-ex
Copy link
Owner

r-ex commented Jan 12, 2026

looks good to me!! thank you for the fix!

@r-ex r-ex merged commit 927229e into main Jan 12, 2026
2 checks passed
@r-ex r-ex deleted the slab_padding_fix branch January 12, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants