HLE: report the Windows commit limit before a title's page pool fails #64

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

@⁠WallasSCRIPTS on GitHub · 2026-11-24 00:03 UTC · original
WallasSCRIPTS:hle/commit-limit-diagnostics → main · +129 −6 · 3 files · 1 commits · closed without merging

Relates to #23.

What

xmem maps the title's 6.5 GiB pagefile-backed section and commits the
whole view with one VirtualAlloc(MEM_COMMIT). When the Windows paging file
cannot cover it, commit() logged only a WARN; the title then stops on its
own 0x80000003 breakpoint, which reads like a crash rather than a host
limit.

  • Read the system commit charge with K32GetPerformanceInfo.
  • victory run prints the available commit and the limit, and warns below
    7 GiB of headroom before loading the title.
  • A failed commit logs the size asked for, the limit, the current charge,
    the shortfall, and the paging-file change that fixes it.
  • README states the commit requirement and the known-good fixed 32 GB page
    file.

Verification

  • cargo test -p victory-hle: 82 passed, 1 failed. The failure is
    modules::display::tests::sdr_and_display_deferrals (0x80070032),
    reproduced on the unmodified checkout too — no display device here.
  • cargo clippy -p victory-hle -p victory --all-targets: clean.
  • cargo build --profile diag -p victory --features diagnostics: links;
    victory.exe --help runs.
  • Two new tests cover the failure message and the charge reading; both pass.

No game data and no small-pagefile host here, so the warning path is
verified by the API-reading test, not by a live run that hits error 1455.

**@⁠WallasSCRIPTS** on GitHub · 2026-11-24 00:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/64) `WallasSCRIPTS:hle/commit-limit-diagnostics` → `main` · +129 −6 · 3 files · 1 commits · closed without merging Relates to #23. ## What `xmem` maps the title's 6.5 GiB pagefile-backed section and commits the whole view with one `VirtualAlloc(MEM_COMMIT)`. When the Windows paging file cannot cover it, `commit()` logged only a WARN; the title then stops on its own `0x80000003` breakpoint, which reads like a crash rather than a host limit. - Read the system commit charge with `K32GetPerformanceInfo`. - `victory run` prints the available commit and the limit, and warns below 7 GiB of headroom before loading the title. - A failed commit logs the size asked for, the limit, the current charge, the shortfall, and the paging-file change that fixes it. - README states the commit requirement and the known-good fixed 32 GB page file. ## Verification - `cargo test -p victory-hle`: 82 passed, 1 failed. The failure is `modules::display::tests::sdr_and_display_deferrals` (0x80070032), reproduced on the unmodified checkout too — no display device here. - `cargo clippy -p victory-hle -p victory --all-targets`: clean. - `cargo build --profile diag -p victory --features diagnostics`: links; `victory.exe --help` runs. - Two new tests cover the failure message and the charge reading; both pass. No game data and no small-pagefile host here, so the warning path is verified by the API-reading test, not by a live run that hits error 1455.
xmem maps the title's 6.5 GiB physical-page section and commits the whole
view in one VirtualAlloc. When the paging file cannot cover it the only
trace was a WARN, after which the title stops on its own breakpoint with no
hint that the host ran out of commit.

Read the system commit charge with K32GetPerformanceInfo, print it at the
start of `victory run`, warn below 7 GiB of headroom, and on a failed commit
log the size asked for, the limit and charge, the shortfall, and the paging
file change that fixes it. Document the requirement in the README.

Two tests cover the report and the charge reading. `cargo test -p victory-hle`
has one pre-existing environment failure (display SDR deferrals, 0x80070032)
unrelated to this change; clippy is clean and the diag build links.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:48:55 +00:00
github-bot closed this pull request 2026-11-26 03:48:55 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 00:09 UTC · original

Tested 6bf8032 stacked on #39 on Arch Linux x86_64, rustc 1.98.1: pass (no regression only).

  • cargo test --workspace: 155 passed, 0 failed, 3 ignored; merge with #39 clean.
  • Scope note: the commit-limit probe and its message are Windows-specific; the Linux run exercises the portable HLE code around it.
  • Overlap note: #51 touches the same xmem.rs area with the same goal (report the commit limit before the title's page pool fails); the two should be merged into one shape.
  • No game data used.

AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠DaviTostes** on GitHub · 2026-11-24 00:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/64#issuecomment-7117758883) Tested `6bf8032` stacked on **#39** on **Arch Linux x86_64, rustc 1.98.1**: **pass (no regression only)**. - `cargo test --workspace`: **155 passed, 0 failed, 3 ignored**; merge with #39 clean. - Scope note: the commit-limit probe and its message are Windows-specific; the Linux run exercises the portable HLE code around it. - Overlap note: **#51** touches the same `xmem.rs` area with the same goal (report the commit limit before the title's page pool fails); the two should be merged into one shape. - No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
Author
Owner

@⁠WallasSCRIPTS on GitHub · 2026-11-24 00:09 UTC · original

Closing this in favour of #51, which covers the same failure: the requested
size, the system commit charge and limit, paging-file guidance, and the
README requirement — and also appends the report to crashes.log, which
this PR does not. One PR per issue is enough.

The one piece here that #51 does not have is a startup preflight: victory run printing available commit and the limit, warning below 7 GiB of
headroom before the title loads. I have left that as a suggestion on #51;
the branch hle/commit-limit-diagnostics on my fork keeps the code if it
is wanted.

**@⁠WallasSCRIPTS** on GitHub · 2026-11-24 00:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/64#issuecomment-7117774078) Closing this in favour of #51, which covers the same failure: the requested size, the system commit charge and limit, paging-file guidance, and the README requirement — and also appends the report to `crashes.log`, which this PR does not. One PR per issue is enough. The one piece here that #51 does not have is a startup preflight: `victory run` printing available commit and the limit, warning below 7 GiB of headroom before the title loads. I have left that as a suggestion on #51; the branch `hle/commit-limit-diagnostics` on my fork keeps the code if it is wanted.

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!64
No description provided.