feat(diagnostics): trace Xbox physical page backing lifetimes #1545
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1545"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jeremygold02 on 2026-11-28T21:28:42Z.
Why
The existing memory-pressure log reports when the host is low on RAM. It gives little visibility into the lifetime of an individual Windows backing section, including whether the game has returned its physical pages while VIctory still holds the section. Correlating these events can help investigate RAM retention during scene transitions.
What changed
Set
VICTORY_XMEM_SECTIONS=1to emit info-level events when Xbox physical pages are allocated or freed and when VIctory is about to close its Windows backing-section handle. The events share a process-local section handle. Free events aggregate removed pages by section, and logging runs outside the page-table lock.The flag defaults to off. Allocation, mapping, and cleanup behavior are unchanged. This is diagnostic instrumentation. Section size describes its allocation span, while resident RAM needs a separate measurement.
Verification
cargo build --release --locked -p victorypassed.VICTORY_XMEM_SECTIONS=1was set forcargo test --release --locked -p victory-hle physical_pages_map_alias_and_unmap. The focused test passed.