xmem: give freed physical page numbers again #124
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!124
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-124"
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?
@Olima34 on GitHub · 2026-11-26 17:33 UTC · original
Olima34:fix/xmem-page-number-free-list→main· +91 −23 · 2 files · 1 commits · merged 2026-11-26 18:09 UTCThe page-number free list from #15 (your point 2 there), small and tested, like #108.
Why.
XMemAllocatePhysicalPageshanded out page numbers that only grew, andXMemFreePhysicalPagesgave none back. The title keeps them in 25 bits (number_kept, #111). So after about 128 GiB allocated since start-up, a live number came back as another page's.What.
Physical::number). This keeps numbers as low as the pages alive at once allow.Physical::pinned, keyed by its slice). It becomes free only once the last view showing that page is unmapped (unmap, checked after the Windows re-maps). So a mapped number never reaches two pages.map_fresh_scatter) no longer requires consecutive numbers: freed numbers come back in any order. It already checks that the pages are consecutive slices of one pool, which is what the batch needs.Test.
freed_page_numbers_are_given_again_once_unmapped, on its ownPhysical, since other tests allocate concurrently:It fails without the free list.
victory-hle tests (macOS x86_64, 246), Windows clippy and
cargo xtask policypass. Not checked in game.@LakshanSivakumar on GitHub · 2026-11-26 18:09 UTC · original
Merged, thanks. This is the page-number free list from #15.