Match XMem allocation hysteresis query width on build 19041 #217
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!217
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/217/head"
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?
@bambermf on GitHub · 2026-11-23 05:31 UTC · original
bambermf:fix/xmem-19041-hysteresis-width→main· +18 −1 · 1 files · 1 commits · closed without mergingLibrary / area: XMem pool allocation hysteresis on console OS build 19041.
Exports changed (exports.txt rows): none. The affected export is
XMemGetAllocationHysteresis.Source of the behaviour: headless IDA analysis of the XMem DLL version 10.0.19041.3948 from Fortnite 2.0.1461.7919. I also ran the original getter instructions in Unicorn with a populated pool record and a stand-in for SetLastError. This measures the getter's arithmetic in isolation.
What was wrong
The getter returned a 64-bit byte count. The 19041 getter shifts the page count in a 32-bit register and zero-extends the result. This becomes observable when the threshold rounds up to 4 GiB.
Measurements
a7a98e0The emulator probes called the exported setter and getter. The third probe requested 4 GiB + 1 byte, which the setter rounds up to the next page.
The change
Use the 32-bit shift when reporting the 19041 pool threshold. Other pool formats retain their existing width. The stored page count and trimming behavior are unchanged.
Tests
The regression covers both sides of the 4 GiB boundary and the two newer granule sizes. The release XMem suite on base
f6ae886with this change passed 56 unit tests and 3 integration tests. The upstream PR gate checked one file and found zero problems.@omonkeyz on GitHub · 2026-11-23 05:44 UTC · original
Applied in
3eac085(merged in1dc9fff) with your authorship kept, thanks.Pull request closed