HLE: recycle freed XMem page numbers #1489
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1490"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-24T18:23:39Z.
Summary
Recycle page numbers removed by
XMemFreePhysicalPagesand prefer them in subsequentXMemAllocatePhysicalPagescalls. This prevents the title's packed 21-bit page-number field from eventually wrapping after repeated allocation/free churn, even when few pages remain live.Addresses VIC-BT-036 from the audit in #1249.
Verification
cargo test -p victory-hle --lib— 95 passedcargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings— passedThe full workspace test run on this Windows 10 machine still has 15 GPU shader tests that require an SM 6.6 hardware or WARP device; the targeted HLE suite passes.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T18:27:59Z.
Review: APPROVED
Verified locally merged onto
origin/main(Windows 11 x64, Rust 1.98.1 MSVC):cargo test -p victory-hle --lib xmem::— 11 passed, 0 failed (includingfreed_physical_page_numbers_are_reused_before_growing_the_pool)cargo clippy -p victory-hle --all-targets— 0 warningscargo xtask policy— okClean free-list recycling of freed XMem physical page numbers in
Physical::allocate_page_number. Looks good.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:41:15Z.
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1445. Same page-number reuse as #1445 without its limit check, so numbers the title cannot represent are still handed out at the limit.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed