RTX 3080 Ti (12 GB), 32 GB RAM: VICTORY_WINDOW_KB / WINDOW_TAILS / INPLACE measured on 90228a7 — none moves private memory by more than ~0.3 GB #54
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#54
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@CDR-0000 on GitHub · 2026-11-24 20:58 UTC · original
shadow.rskeeps the 4 MiB window grid "until a run with the memory line's window counts has shown what the finer grids give". Four runs answer that on this PC.Setup
NVIDIA GeForce RTX 3080 Ti 12 GB (32-lane waves), driver 32.0.16.1742; Ryzen 7 7800X3D; 32 GB RAM, 16 GB page file (commit limit 47.6 GB); Windows 11 Pro 26300; diag build (
--profile diag --features diagnostics) of90228a7. Same route each run (straight into the prologue), no input. Each run was stopped by an outside guard at 20 GB private, 85–98 s in, all past the world load.VICTORY_WINDOW_KB=1024VICTORY_WINDOW_KB=256+VICTORY_WINDOW_TAILS=1VICTORY_INPLACE=1(+_PROBE=1)Where the memory is (default run, memory map at 19.7 GB private): title heaps 4628 MB; process heap 741 MB; windows 2206 MB; write-combined 7047 MB (146 × 32 MB: 4137 MB); other private ≥ 1 MB 4012 MB (3 × 1024 MB: 1435 MB, 28 × 32 MB: 893 MB); card 6740 of 11316 MB budget, 4919 MB of PC memory shared with it.
Without a larger page file the plain release build ends with
memory allocation of 3145728 bytes failedat 23.4 GB private, ~240 s in. So on a 32 GB PC the window and in-place switches don't change whether the game fits; what would is making the page pool openable in place (SEC_COMMIT, at 6.2 GB of commit up front) or dropping the CPU side of copies.Logs and summaries for all four runs available on request.
Written with Claude Code (Claude Opus 5.5); the runs are mine.
@JFIREonFIRE on GitHub · 2026-11-24 23:05 UTC · original
More context on where private memory goes, since the windows are only a small part of it. Taken from the fork's own
memory mapdiagnostics line at steady state in the prologue. RTX 3090 24 GB, 32 GB RAM,2119b0e, diag build, about 11 minutes in the world. The process peaked at 24.7 GB private, and Windows had to grow the page file to fit it (system commit 50 of 52 GB, 3–4 GB of RAM free).Points that may help decide what to work on. They come from reading the code, so they are leads, not measurements of a change:
XMemVirtualAllocwithMEM_COMMITcommits the whole range up front (xmem.rs, theVirtualAlloc2call). Reserving and committing on first touch would return most of that, with these risks:VirtualQuerymust still answer COMMIT;SEC_RESERVEsection. A page's commit is taken when it is first mapped and never comes back while the section lives. It also isn't counted in "private", which is why the system commit is higher than private suggests. Splitting it into sections under 4 GiB would also clear the way forOpenExistingHeapFromFileMapping(which upstream #880 found refuses committed sections of 4,096 MB and above). In your runs, page-pool views are most of the windows.AI-assisted (Claude Code). Counts from the log only.
@j-fuxa on GitHub · 2026-11-26 01:41 UTC · original
Numbers from an RTX 4060 Laptop (a hardware adapter) for calls that the header of inplace.rs measured with WARP, plus one trap.
Matches the header:
OpenExistingHeapFromFileMappingreturns E_INVALIDARG for a SEC_RESERVE section;OpenExistingHeapFromAddress1(addr, size)opens committed 64 KiB-aligned sub-ranges as custom write-back L0 heaps; placed resources needD3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER(textures row-major only); while a heap is open,VirtualProtect,VirtualFreeandUnmapViewOfFileon its pages fail with error 87.Different from the WARP figure (70 ms for 256 MiB; not like for like, another adapter): opening cost 2.4 to 5 ms per heap regardless of size. Opening makes every page resident (+256 MiB of working set for an untouched 256 MiB range). So the number of heaps, not their size, sets the cost; a few large heaps would beat many 4 MiB ones.
One A/B in the title's world (copy against in place, a single run each): fps 0.8 / 0.8, preparing 597 / 406 ms, GPU 304 / 505 ms (not explained), working set 14.31 / 13.52 GiB.
A trap if pages are dirtied for
GetWriteWatchfrom Rust:AtomicU8::fetch_add(0)is an idempotent read-modify-write, which release builds lower to a plain load. The page stays clean, so dev-profile tests pass and release builds fail.lock add byte ptr [p], 0(inline asm) does dirty it. We saw no use of that pattern in the files we read; flagging it in case a dirtying helper is added.Caveats: single runs, the GPU-time rise is unexplained, and our in-place path differs from the one in this tree.