residency: read a single-string PagingFiles value (system-managed pagefile growth counted) #4066

Open
github-bot wants to merge 1 commit from github-bot/gh-4066 into main AGit
Owner

@⁠jebaczydow on GitHub · 2026-11-30 15:26 UTC · original
jebaczydow:regsz-pagefile → main · +5 −3 · 1 files · 1 commits · open

What it changes

pagefiles() in crates/victory-gpu/src/residency.rs asks the registry for PagingFiles as REG_MULTI_SZ only. On a system-managed pagefile, Windows can store that value as a single REG_SZ (?:\pagefile.sys). Then the read fails, the pagefile list is empty and commit_growth() is 0, so available_commit() equals the raw ullAvailPageFile again. available_commit() is what the memory guard has used since #2392.

The change adds RRF_RT_REG_SZ to the type filter of the two RegGetValueW calls (size query and read). The parsing after the read is unchanged: it already splits on \0.

How it was tested

  • Checked on my PC (Windows 11 10.0.26300): PagingFiles under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management is a REG_SZ with the value ?:\pagefile.sys.
  • cargo build --release --locked -p victory builds on c71899d9.
  • GPU and profile: RTX 5070 Ti, Series X, DLSS balanced, frame generation 2x, 1080to1440. I have not run the game with this change on c71899d9 and have not measured a before/after there.
  • cargo test for the crate: not run. The victory-gpu lib test target does not compile on c71899d9 (with and without this change): host.rs:20302 and host.rs:20328 call a function that takes 6 arguments with 5.
  • For shader changes: not a shader change.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. None changes how pagefiles() reads the registry. Related: #339 and #2392 (merged), #2717, #3379.

🤖 Generated with Claude Code

**@⁠jebaczydow** on GitHub · 2026-11-30 15:26 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4066) `jebaczydow:regsz-pagefile` → `main` · +5 −3 · 1 files · 1 commits · open ## What it changes `pagefiles()` in `crates/victory-gpu/src/residency.rs` asks the registry for `PagingFiles` as `REG_MULTI_SZ` only. On a system-managed pagefile, Windows can store that value as a single `REG_SZ` (`?:\pagefile.sys`). Then the read fails, the pagefile list is empty and `commit_growth()` is 0, so `available_commit()` equals the raw `ullAvailPageFile` again. `available_commit()` is what the memory guard has used since #2392. The change adds `RRF_RT_REG_SZ` to the type filter of the two `RegGetValueW` calls (size query and read). The parsing after the read is unchanged: it already splits on `\0`. ## How it was tested - Checked on my PC (Windows 11 10.0.26300): `PagingFiles` under `HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management` is a `REG_SZ` with the value `?:\pagefile.sys`. - `cargo build --release --locked -p victory` builds on `c71899d9`. - GPU and profile: RTX 5070 Ti, Series X, DLSS balanced, frame generation 2x, 1080to1440. **I have not run the game with this change on `c71899d9`** and have not measured a before/after there. - `cargo test` for the crate: **not run.** The `victory-gpu` lib test target does not compile on `c71899d9` (with and without this change): `host.rs:20302` and `host.rs:20328` call a function that takes 6 arguments with 5. - For shader changes: not a shader change. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. None changes how `pagefiles()` reads the registry. Related: #339 and #2392 (merged), #2717, #3379. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On a system-managed pagefile Windows can store PagingFiles as one REG_SZ
("?:\pagefile.sys"), not as REG_MULTI_SZ. pagefiles() asked the registry for
REG_MULTI_SZ only, so the read failed, the list came back empty and
commit_growth() was 0. available_commit() (used by the memory guard since
#2392) then equalled the raw ullAvailPageFile again.

Accept both types in the same RegGetValueW calls.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 15:29:23 +00:00
Author
Owner

@⁠jebaczydow on GitHub · 2026-11-30 19:47 UTC · original

Still the case on v2026.11.30.03 (this PR is not in it).

On this PC the PagingFiles registry value is a single REG_SZ (?:\pagefile.sys, system managed), not REG_MULTI_SZ. Two play logs from v2026.11.30.03 (Windows 11 10.0.26300, RTX 5070 Ti, 32 GB RAM) both show:

  • residency: pagefiles: commit can grow beyond the limit of the moment ... pagefiles=[] commit_limit_mib=43124
  • memguard: a compile is put off ... reason="the commit left would fall under its floor": 11 times in one run, 10 in the other, each with about 3.9 GB of free commit.

The change here applies cleanly on top of v2026.11.30.03 (residency.rs is the same as in v2026.11.30.01) and builds. I have not yet played with it on v2026.11.30.03, so I do not claim what it changes in the game.

**@⁠jebaczydow** on GitHub · 2026-11-30 19:47 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4066#issuecomment-7289944462) Still the case on v2026.11.30.03 (this PR is not in it). On this PC the `PagingFiles` registry value is a single `REG_SZ` (`?:\pagefile.sys`, system managed), not `REG_MULTI_SZ`. Two play logs from v2026.11.30.03 (Windows 11 10.0.26300, RTX 5070 Ti, 32 GB RAM) both show: - `residency: pagefiles: commit can grow beyond the limit of the moment ... pagefiles=[] commit_limit_mib=43124` - `memguard: a compile is put off ... reason="the commit left would fall under its floor"`: 11 times in one run, 10 in the other, each with about 3.9 GB of free commit. The change here applies cleanly on top of v2026.11.30.03 (`residency.rs` is the same as in v2026.11.30.01) and builds. I have not yet played with it on v2026.11.30.03, so I do not claim what it changes in the game.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4066/head:github-bot/gh-4066'
git switch 'github-bot/gh-4066'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4066'
git switch 'github-bot/gh-4066'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4066'
git switch 'github-bot/gh-4066'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4066'
git switch 'main'
git merge --squash 'github-bot/gh-4066'
git switch 'main'
git merge --ff-only 'github-bot/gh-4066'
git switch 'main'
git merge 'github-bot/gh-4066'
git push origin 'main'
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/trustno1-coder--VIctory-NVIDIA!4066
No description provided.