[pr-fix][memory][startup] Read single-string Windows page-file settings #308
Loading…
Reference in a new issue
No description provided.
Delete branch "andrewpozdnakov7-jpg/Darner:fix/306-system-managed-pagefiles"
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?
Contributor role (optional)
What it changes
Both Darner reads of PagingFiles restrict RegGetValueW to REG_MULTI_SZ. A REG_SZ value such as ?:\pagefile.sys is rejected, so the residency budget misses system-managed growth and the startup memory check cannot read the page-file configuration. The same two type flags are now accepted in the size and data queries. The existing parsers handle the strings.
Fixes #306.
Ported from VIctory-NVIDIA #4066 by jebaczydow, credited as co-author. Darner port by andrewpozdnakov7-jpg (GitHub profile). If reusing this commit, please retain the Git author and the original co-author trailer.
How it was tested
bd123e9onf3840d7.Checklist
Checked for overlap
Independent Windows build, gate, and code-read review of
bd123e95d387(full headbd123e95d387372aa35929cd4769f0e275fc2402), based onmainf3840d73d3504c30218debfbc8795b9225447317. Not run in-game.Environment
x86_64-pc-windows-msvc), MSVC 19.44.35230.Measured results
cargo clippy --workspace --all-targets --locked -- -D warnings): PASS.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings): PASS.cargo xtask policy: PASS (asset policy: 555 files ok).cargo test --locked -p darner-gpu --lib residency::tests: PASS (12 passed; 0 failed; 0 ignored).cargo test --locked -p darner-gpu --lib streamline::tests: PASS (11 passed; 0 failed; 0 ignored).cargo test --workspace --locked) and gameplay were not run in this review.Code-read audit
pagefilesregistry queries use the sameREG_MULTI_SZ | REG_SZtype mask for size discovery and data retrieval, while retaining the existing error/empty fallback and bounded UTF-16 buffer handling (crates/darner-gpu/src/residency.rs:112-151). Its parser splits the returned string data on NUL, accepts the system-managed?:root and optional sizes, and derives the configured maximum as before (residency.rs:155-170).ram_and_page_filesapplies the same type mask to bothRegGetValueWcalls, sizes its buffer from the query, truncates to the returned UTF-16 length, and filters empty strings after splitting—covering both oneREG_SZentry andREG_MULTI_SZentries (crates/darner-gpu/src/streamline.rs:1202-1236).REG_SZ,REG_MULTI_SZ, andREG_BINARY; I did not independently repeat that fixture.No blocking issue found.
Verdict: PASS.
AI-assisted: yes (GitHub Copilot, Auto mode).
Code review only (read the diff at
bd123e95), nothing built or run. I agree with lewis499: both readers acceptREG_SZ, and the parsers already handle one string.PagingFilesis a single string,commit_growthused to see no page file and count no growth. Now it counts how far Windows can still grow the file (capped at the volume's free space less 8 GB), so Darner reports "host memory pressure" later (fewer held texture uploads and sweeps). It is expected to help stutter and late textures, not running out of memory.Reviewed with Claude Code (AI-assisted); findings checked by a human before posting.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.