Reserve low address space for 32-bit XMem allocations #6
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/srmooon--sixmoon!6
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-6"
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?
@drowniscool on GitHub · 2026-12-01 18:13 UTC · original
drowniscool:fix/xmem-32bit-address-space-spare→main· +76 −10 · 1 files · 2 commits · openProblem
On Windows, the title requests console-compatible XMem in a constrained 32-bit address window. Host graphics mappings can fragment the low 4 GiB before that request. My logs show a 193,986,560-byte allocation failing with Win32 error 8 and
largest_free_mb=0; this is virtual-address-space exhaustion, not proof that physical RAM is exhausted. This can prevent the title from completing startup allocations.Change
Reserve a separate address-space-only spare below 4 GiB before host graphics mappings. If a constrained
ADDRESS_32BITallocation fails, release that spare and retry; keep the existing high-range spare for other allocations. Add a test that verifies the spare is within the 32-bit address range.Validation
cargo test -p sixmoon-hle title_32bit_spare_reserves_space_below_four_gib(passes on Windows).0xe0000000.This targets the early XMem allocation failure only; it does not claim to fix later graphics-driver crashes.
@copilot-pull-request-reviewer[bot] on GitHub · 2026-12-01 18:16 UTC · original · reviewed
🔵 Needs a closer look
The extracted helper triggers
clippy::let_and_return, which blocks both CI Clippy jobs because they use-D warnings.No open issues 🎉
What changed in this PR
This PR protects low address space from host graphics mappings so constrained 32-bit XMem allocations can complete during title startup.
Changes:
crates/sixmoon-hle/src/modules/xmem.rsReview effort: Balanced
@drowniscool on GitHub · 2026-12-01 23:01 UTC · original
Just one of a few issues I've found, let me know if this is acceptable.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.