HLE: recycle freed XMem page numbers #1490

Closed
github-bot wants to merge 1 commit from gh-pr/1490/head into gh-pr/1490/base
Owner

@⁠Calvix2k on GitHub · 2026-11-24 18:23 UTC · original
Calvix2k:codex/xmem-page-reuse-036 → main · +31 −4 · 1 files · 1 commits · closed without merging

Summary

Recycle page numbers removed by XMemFreePhysicalPages and prefer them in subsequent XMemAllocatePhysicalPages calls. 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 passed
  • cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings — passed
  • Repository pre-commit asset-policy hook — passed

The 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.

**@⁠Calvix2k** on GitHub · 2026-11-24 18:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1490) `Calvix2k:codex/xmem-page-reuse-036` → `main` · +31 −4 · 1 files · 1 commits · closed without merging ## Summary Recycle page numbers removed by `XMemFreePhysicalPages` and prefer them in subsequent `XMemAllocatePhysicalPages` calls. 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 passed - `cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings` — passed - Repository pre-commit asset-policy hook — passed The 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:33:46 +00:00
github-bot closed this pull request 2026-11-26 04:33:46 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:41 UTC · original

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.

**@⁠Marvisak** on GitHub · 2026-11-25 00:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/1490#issuecomment-7148771786) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1490
No description provided.