startup-runtime: physical-page sections exhaust system commit before loading completes #1192
Open
opened 2026-11-24 03:29:32 +00:00 by denn0x
·
40 comments
No Branch/Tag specified
main
codex/indirect-large-backed-views
codex/word3-preflight-check
codex/vertex-table-two-records
codex/live-index-alias
codex/copied-vertex-buffer-srv
codex/windows-stage-test-output
codex/preserve-live-srv-retirement
codex/share-render-target-tracking
codex/sgd5-negative-offset-fixture
coverage-dashboard
codex/mesh-loose-root
codex/mesh86-cache-padding
codex/xmem-scatter-preflight
codex/mesh-depth-ps
codex/indirect-dispatch-refresh
codex/compute-container-index
codex/startup-compute-formatted-load
codex/compute-indirect-producer
codex/compute-atomic-soffset
codex/mesh-dual-handoff
codex/startup-run-sh-watcher-control
codex/queue31-page-alias
codex/indexed-indirect-compute-root
codex/typed-buffer-view-metadata
codex/translated-indexed-address-alias
codex/fixed-mesh-create-result
codex/xmem-section-lease
codex/startup-slot86-mesh-cache
codex/restore-mesh-barrier-iteration
codex/translated-indirect-upload-index
codex/xapu-completion-opt-in
codex/translated-indexed-rect
codex/translated-indexed-indirect
codex/startup-mesh-lds-integration
codex/startup-console-ms24
codex/startup-slot57-mesh-request
codex/indirect-copy-provenance
codex/present-color-producer-trace
codex/compute-dispatch-binding-trace
codex/translated-indirect-table-buffers
codex/indirect-copy-provenance-base
codex/mix-half-literal-source
codex/translated-indirect-draw
codex/xmem-scatter-diagnostics
codex/slot148-recording-upload
codex/slot70-loading-art-verified
codex/command-list-upload-arena
codex/recover-failed-command-list
codex/startup-heap-timing-notes
codex/align-audio-input-timeline
codex/synthetic-depth-export-control
codex/startup-texture1d-on-windows
codex/1629-packed-position-fixture
codex/cpu-srv-refresh
codex/stream-root-srv-draw
codex/audio-mixer-timer
codex/startup-reload-published-shader
codex/priority-integrate-1284
codex/guest-sixteen-page-record
codex/aot-placed-dxr-batch
codex/guest-directory-selection
codex/gamesave-enumerate-read
codex/readme-archive-to-pixels
codex/pe-placed-view-draw
codex/archive-directory-gpu
codex/slot133-dxr-build
codex/materialize-placed-vertex-view
codex/dstorage-directory-offsets
codex/xg-nine-bc-copy
codex/xg-slot10-bc64-arrays
codex/dxr-guest-address-readback
codex/gpu-va-high-bits
codex/clarify-diagnostic-startup-scope
codex/xg-six-levels
codex/typed-derived-blend
codex/english-legal-text-progress
codex/address-bc-4ks
codex/dstorage-bounded-file-read
codex/wide-srv-offsets-menu
codex/startup-memory-srv
codex/bound-view-tail
codex/language-selector-readback
codex/setup-menu-progress
codex/cpu-plane-refresh
codex/startup-ubyte-vertex
codex/presenter-window-selection
codex/startup-uniform-buffer-lane
codex/intro-loop-timing
codex/static-clzero-loops
codex/document-rtx-intro
codex/startup-insertq
codex/nv12-startup-texture
codex/stream-stage-draw
codex/startup-null-uav-format
codex/startup-draw-capture
codex/shorten-windows-checks
codex/dstorage-rfc1950
codex/startup-dump-fence
codex/pr1135-review-base
codex/startup-stream-requests
codex/startup-chroma-view
codex/readme-graphics-pipeline-streams
codex/static-crt-free-tls
codex/arc-140t-rtx-5080-laptop-gpu-reports
codex/main-startup-progress-entry
codex/signed-dxil-catalogue
codex/reloc-free-preferred-base
codex/quad-dpp-bit-mask
codex/raw-srv-bounds
codex/rx9070-31044-hardware-report
codex/gpu-page-source-provenance
codex/runtime-placeholder-interior
codex/gpu-copy-queue-tile-order
codex/pe-pin-external-providers
codex/xmem-placeholder-reservations
codex/xmem-shared-physical-pages
codex/pe-package-startup
codex/xmem-tools-memory-query
codex/cpu-stack-output-import
codex/pe-load-security-cookie
codex/record-three-bvh-retests
codex/cpu-rbp-frame-anchor
codex/xmem-default-startup
codex/record-rtx-3050-ti-9597
codex/docs-readme-start-here
codex/check-compute-mad24-truncation
codex/docs-discord-community
codex/bound-rcx-branch-mutants
codex/rtx5060ti-bvh-62114
codex/837-neutral-readme-disclaimer
codex/record-rtx-3070-ti
codex/title-neutral-public-wording
codex/exe-shadow-frame-submissions
codex/exe-shadow-runtime-chain
codex/readme-polish
codex/gpu-coverage-nov23
codex/spirv-minlod
codex/shadow-shim-device
codex/exe-two-shadow-frames
codex/shim-dispatch-cleanup
codex/fix-spirv-cache-probe
codex/sampler-use
codex/ballot-bit-extract
codex/packed-fma-release
codex/cpu-packed-fma-o2
codex/publish-coverage-dashboard
codex/mesh-cbv-binding-order
codex/spirv-window-fixture
codex/ps-e32-float-uint
codex/ps-cbuffer-reads
codex/fixed-profile-rescan
codex/shim-compute-integration
codex/readme-visible-coverage
codex/readme-research-navigation
codex/integrate-pr-256
codex/indexed-mesh
codex/sampled-coverage
codex/first-ms
codex/dual-ps
codex/ps-attribute
codex/compute-first
codex/ps-export
codex/readme-research-status
codex/ps-layout
codex/blast-window
codex/chart-caption
codex/reviewer-roles
codex/blast-aot
codex/archive-program
codex/crc-stream-program
codex/exe-image-data-chain
codex/local-cpu-fixture-coverage
codex/exe-bound-frame-chain
codex/exe-mapped-comparison
codex/contribution-dependencies
codex/exe-entry-aot
codex/bink-frame-heap-integration
docs/hardware-seven-reports
codex/bink-custom-heap
codex/bink-heap-callers
codex/discussions-entry-points
codex/gpu-community-batch-64
codex/ffx-scratch-writers
codex/generic-project-documentation
codex/ffx-dispatch-rcas
codex/four-windows-gpu-reports
codex/title-neutral-project-wording
codex/community-coverage-provenance
codex/rcas-packed-texels
codex/community-gpu-retests
codex/community-build-and-gpu-reports
codex/ffx-provider-loop
codex/ffx-recurrent-views
codex/ffx-recurrent-resource
codex/amd-wave64-reports
codex/ffx-backend-slots
codex/upscaler-device-init
codex/ffx-context-lifecycle
codex/ffx-version-query
codex/ffx-provider-contract
codex/typed-object-callback
codex/cpu-ordinal-import
codex/chained-cpu-ranges
codex/cpu-import-call
codex/cpu-direct-call
codex/cpu-leaf-aot
codex/community-project-status
codex/script-state-path-replay
codex/script-state-evidence
codex/bc7-resident-tail
codex/bcpack-mip-tail
codex/bc7-texture-draw
codex/asset-ranges
codex/pixel-constants
codex/pixel-aot
codex/pre-exe-workloads
codex/root-signature-device-coverage
engineering/packed-bvh-leaves
engineering/bvh-build-and-update
engineering/intake-root-roundtrip
community/gpu-check-release
community/english-contributor-entry
gpu-check-v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Reference
R0Y00/Xbox2Windows#1192
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?
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T03:29:32Z.
On a 32 GB machine with a 13 GB page file and an ordinary desktop open (about 12 GB of commit free), a startup run cannot get past loading. Allocations fail with
ERROR_COMMITMENT_LIMIT(1455) andERROR_NOT_ENOUGH_MEMORY(8), then the process ends.Observed
XMemMapPhysicalPagesScatterfails with 1455,CreatePlacedResourceXreturnsE_OUTOFMEMORY, then the DirectStorage worker hits a stack overflow (0xc00000fd) while handling thestd::bad_alloc(about 280 s, during loading).XMemMapPhysicalPagesfails with 1455 for single pages at 73 s, before the menus.Why it costs so much:
src/xmem_mapped_pages.cppbacks every 64 KiB physical page with its own pagefile-backed section, created asSEC_COMMIT, so each page counts against commit as soon as it is first mapped or written. Pages the executable allocates and maps but never touches still count in full.Proposed
SEC_RESERVEand committed on first touch, or batch pages into larger sections, so untouched pages do not count against commit.bad_allocwithout extra work on the faulting stack, or give the worker a larger stack.Done when a run reaches the same point as today with less peak commit (numbers before and after), and an allocation failure in the worker fails the request instead of ending the process.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T03:41:10Z.
Tried one direction locally: physical-page sections created with
SEC_RESERVE, each page committed on first touch by a vectored exception handler, and explicitly before the stand-ins' own writes. The placed-resource check also accepts mapped views that are still reserved.VirtualQuerystate checks, or something else). Anyone taking this route needs to answer that first.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T04:47:20Z.
More measurements: an address-space walk of the running executable every 10 s. Machine: 32 GB RAM, 44 GB commit limit, 11.3 GB of commit free before launch.
std::bad_allocin the storage stand-in, or a null from the executable).Experiment: commit the four pools on first touch. They are reserved, and a vectored handler commits 64 KiB on first access. Placed buffers on them commit their span at creation.
Conclusion so far: loading needs roughly 14–16 GB of commit, which is in line with the ~13.5 GB a title gets on the console. On a 32 GB machine that leaves room only if other processes use little memory or the pagefile is larger. Shrinking the footprint needs real changes, for example not mapping the GPU-view mirror for sections the GPU never reads. That is worth a separate experiment.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T06:14:18Z.
Claiming the heartbeat/observability slice (item 1 in the issue): report peak commit and the number of live physical-page sections in the startup heartbeat, so runs can be compared.
Scope: read-only accounting added to the existing heartbeat line; no allocator or mapping behaviour change (that is denn0x's SEC_RESERVE direction, not this one). Synthetic fixture check only; no game image.
Verification plan: extend the heartbeat test with a synthetic fixture that creates and releases physical-page sections plus a known peak-commit delta, assert both counters appear and track the fixture in both directions, then run the neighbouring startup tests.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T06:22:31Z.
Item 1 (heartbeat/observability) is implemented in #1270.
The DirectStorage heartbeat now carries
commit peak=<MiB> current=<MiB>, live physical-page sections=<n>, and it re-reports when either memory value changes even if the request counters are static, so a stalled load still shows what it holds. The section count comes from a new experimentalx2w_xmem_page_statsexport inxmem.dll; no allocator or mapping behaviour changed, so this is independent of theSEC_RESERVEdirection.Source-built checks:
xmem_page_statsdrives the snapshot through a grant, two mapped pages, unmapping and release, plus a page-token write that has no view;startup_heartbeat_commitstarts the real heartbeat in a synthetic process with two mapped sections and checks the reported count and peak againstGetProcessMemoryInfo. Both fail on the previous build for the expected reason and pass now; neighbouring xmem/era/stub tests pass. Exact output is in the PR.Still open for a run with the package: the reported peak commit and section count of a real startup run, for before/after comparison.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T06:34:48Z.
The observability from #1270 is now in a branch, and here are the first real-run numbers for this issue — they confirm the scale of item 2.
Offline run of the title to a 120 s timeout (no title file or log attached), with the heartbeat reporting commit and live physical-page sections for the first time:
102,736 live physical-page sections. At 64 KiB per page that is about 6.4 GiB of backing, which matches the ~7.7 GiB of peak commit the same run reached. The section count is flat from 10 s onward while commit keeps rising, so the growth is the mapping/commit of pages that were already section-backed, not new sections — consistent with "each page created as SEC_COMMIT counts against commit as soon as it is first mapped or written".
That gives item 2 a concrete baseline to measure against (peak commit and section count before/after any change to the backing strategy), and it makes the earlier 1455 / ERROR_NOT_ENOUGH_MEMORY failures much easier to attribute: a run that fails needs roughly 7.7 GiB of commit just for the physical-page backing.
I have not attached logs, dumps or anything containing addresses from the executable — these are numbers about the stand-in's own accounting.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T21:40:54Z.
#1756 is on main at
3920220f. The exact Windows Release candidate passed xmem_slab_slots, xmem_page_stats, xmem_shim_mapped_pages and xmem_shim_page_runs (4/4). For comparison runs, the new counters separate open slabs from used and free slots. Freeing a grant returns slots to the allocator. The committed slabs stay open, so the memory-reduction goal remains open.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T23:12:33Z.
#1958 is on main at
5d63a269. Six Windows Release checks passed, including an injected commitment failure that leaves the reservation and slot counts unchanged and allows the same grant to be mapped on retry. In the source-built 16-page comparison, the system commit delta was 256 MiB on the eager baseline and 1 MiB on the lazy candidate.For the next application comparison, record peak and current commit, live pages and the first stopping condition on the same bounded startup window with identical settings. Please post aggregate counters only. The source-built comparison does not establish a later application startup boundary.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T06:27:42Z.
Two data points from a 64 GB host: Windows 11 build 26300, RX 9070 XT, system-managed page file at its 116 GiB ceiling, so a commit limit of about 180 GB. Counts only.
1. Process commit once a run gets past the slot 148 stop
mainatc374c7bf(with #2216), Release,-MemoryGiB 32, the post-confirmation input. The run went to the 600 s limit instead of stopping at the builder. The startup heartbeat (#1270) reported:2. System commit stayed exhausted after every process had exited (cause unknown)
At 06:56, during that run, Windows logged Resource-Exhaustion-Detector event 2004 (low virtual memory). Agents were running D3D12 test suites at the same time, including #1942's and #2218's fixtures, which create 256 MiB pagefile-backed sections and open existing heaps over them. The event repeated at intervals until 07:19.
After the title process and every test process had ended:
The event's own "top consumers" list showed only ordinary desktop processes (2.3, 1.1 and 1.0 GB). So about 160 GB stayed committed with no process accounting for it, and builds then failed with
C1060 compiler is out of heap space.I haven't identified the holder, and I can't tell yet whether the title run, the section and heap fixtures, or something outside this project left it behind. It may be a separate problem from the per-run cost this issue tracks: commit that a run or fixture leaves behind after its process exits. After a restart I'll measure it in isolation:
I'll report the deltas here. If a run or fixture leaves commit behind once its process has exited, that should probably get its own issue.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T06:31:51Z.
Follow-up on the retained commit, read live on the same host before any restart. Read-only, through
NtQuerySystemInformation.\Memory\Committed Bytes. Shared committed: 158.55 GiB.csrsswith 277. A startup run alone creates over 113,000 physical-page sections.So about 159 GiB of section objects are kept alive by references from kernel mode only.
Hypothesis, not yet tested: D3D12 heaps opened over pagefile-backed sections and their views, with
OpenExistingHeapFromFileMappingandOpenExistingHeapFromAddressonMEM_MAPPEDviews.unified_buffer_paths,vm_page_provenance, and the opt-inlinear_buffer_backingshare path) were run many times on this host today, alongside the startup runs.Planned bisect after the restart, on an idle host: for one suspect at a time, record shared committed pages before, at peak, at process exit and 10 s later.
unified_buffer_pathson WARP and hardware, run to completion;TIMEOUTkills it;vm_page_provenance_hardware;A probe that leaves shared commit behind after its process has exited identifies the leaking operation. If it's the existing-heap path, the fixes are in our control: release heaps before exit and never leave them to process teardown, avoid opening heaps over views in fixtures that can be killed, and add a commit check to the long-running tests. I'll post the table here.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T06:47:01Z.
Found the retained commit from my earlier comment: #2234. After a reboot I bisected on an idle host.
The leak is
OpenExistingHeapFromFileMapping. On Windows 11 build 26300 it keeps the whole pagefile-backed section committed after the process exits, even after the heap is released and the section closed, on WARP and on the RX 9070 XT.OpenExistingHeapFromAddresson a view of the same section does not leak.Only tests use it.
unified_buffer_paths(#1942) leaves about 1.8 GiB per run, which over a day of repeated runs filled this host's 180 GB commit limit. The startup runs did not cause it.So the per-run cost this issue tracks and that retention are separate problems. #2234 has the repro, the numbers and the test-side fix.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T07:42:34Z.
The opt-in lazy XMem paths landed in #2209 (
45fa67fa). On the exact candidate, independent Windows Release passed all 24 selected checks, including refused release, forced handler-installation failure, mapped pages and slot 148. This covers lazy page commitment and startup-block handling. The retained system commit from OpenExistingHeapFromFileMapping remains separately tracked in #2234. Keep any application A/B on the same initial cache and inputs, and report system commit and local video-memory budget separately.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T08:24:30Z.
The independent Windows 10 / RTX 3080 Ti replay provides a same-progress comparison for #2209. At 200,000 inflated blocks, process commit was 22,575 MiB with the switches off and 21,336 MiB with them on. Both runs reached 480 seconds under the 26 GiB job cap without an allocation refusal. A separate 16 GiB-capped run still hit the cap. This measures process commit on that configuration. The GTX 1060 local-video-memory budget and the retained system commit in #2234 need their own measurements.
Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-25T13:35:29Z.
Memory data from a 32 GB host (aggregate counts only, one local run per row, not reproducible from this repository).
Setup:
5fa712ee, Release, Windows 11 build 26300.9974, RX 9070 XT (driver 32.0.32029.2010), 31.1 GB usable RAM. All runs used-Render -Translate -FakeUser -GpuMirror -ContinueAsserts 1000, with the shader cache kept between runs. "Lazy" meansX2W_XMEM_LAZY_COMMIT=1andX2W_XMEM_LAZY_STARTUP=1.-StartupBelow400x8007000efrom slot 133, then an access violation; peak at the capDestAccelerationStructureDataabove 40 bitsstd::bad_allocthrown ind3d12_xs.dllfailed=0in the last heartbeat of each run.bad_alloc, so reaching the cap is an inference.-StartupBelow40, three startup blocks were placed below 2^40, none was refused, and the 40-bit error did not appear.-StartupBelow40run the commit limit was 55.1 GB; after the 30 GiB run the allocated size was 24,576 MB.The first two rows are the closest A/B: same build, cap, command-line options and shader cache directory, with only the two lazy switches changed. Their last heartbeats are 20 s apart (190 s and 170 s). The other rows also change the cap or
-StartupBelow40. Each configuration was run once.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T14:18:12Z.
Thanks for recording both the load progress and the caps. The two 14 GiB runs give a useful common comparison point near 15,000 inflated blocks. If the existing logs include that point, could you post the nearest sample for each run with the exact block count, process commit and physical-page section count? A matched repeat with the same initial shader cache and fixed page-file settings would also help if the logs do not have it.
For the later
std::bad_alloc, the last heartbeat establishes rising commit, but there is no sample at the failure. A follow-up can report the first failed allocation category or call site and the process/job commit at that point if available. Aggregate counts are enough.Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-25T17:48:38Z.
The existing logs have a close matching point for the two 14 GiB runs (nearest heartbeat to 15,000 inflated blocks in each):
At this point, current commit was 962 MiB lower with the lazy switches on. In both logs, the first
CreatePlacedResourceXresult of0x8007000eappears after these samples.Limits: one run per configuration, shader cache kept between runs (initial contents not guaranteed identical), and a system-managed page file.
For the
std::bad_alloc, the logs I checked show neither the first failed allocation nor the commit at the failure. I am still working on it.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-25T18:46:18Z.
Follow-up on the
std::bad_alloc, from one new 30 GiB run (not a repeat of the earlier one).Setup:
1a0e506dplus a local, unpublished debugger diagnostic, Release stand-ins built with PDBs, both lazy switches on,-StartupBelow40, warm shader cache, 32 GB host.At the failure (476 s), sampled by the debugger:
bad_alloc; delivery is not guaranteed, so earlier refusals are not ruled out.0x8007000ein the stand-in log.operator newwhileview_recordsgrows innote_view(d3d12_capture.inl:309).This shows where the allocation failed, not what accounts for the 30 GiB. I did not measure the total size of the view tables, and the draw code reads these records. No log heartbeat appears after the 360 s one; I don't know why yet.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-25T21:45:20Z.
Follow-up to my
view_recordsreport: two more runs on newer code ended instd::bad_allocfromnote_view, one of them at a second allocation site.Setup:
e9ae884f, Release stand-ins, 32 GB host, system-managed page file. Switches:-Render -Translate -FakeUser -GpuMirror -StartupBelow40 -ContinueAsserts 1000, withX2W_XMEM_LAZY_COMMIT,X2W_XMEM_LAZY_STARTUP,X2W_D3D12_RELEASE_RETIREDandX2W_D3D12_BUDGETset to1. The shader cache was kept between runs (older requests had been re-keyed withshader_cache_rekey.py). One run per row, local, not reproducible from this repository.-Seconds 0)d3d12_capture.inlview_idsrehashview_recordsgrowthI found no
0x8007000ein either stand-in log.How the sizes were calculated (MSVC containers; not measured at the failure):
In both runs the calculated request is larger than the room left under the cap in the heartbeat above.
How the sites were found: the
ThrowInfoin the DLL that ran namesstd::bad_alloc. That DLL had no PDB, so I rebuilt it separately with/Ziand/DEBUG /OPT:REF /OPT:ICF. The.textsections have the same size and differ in 26 bytes. Function names and lines come from a scan of the raw stack against that PDB, not from an unwound call stack.Limits:
Possible directions, both untested: chunked storage for the records could avoid the large copy in the vector, but would not stop the growth or cover the map rehash. A per-slot count of new distinct records could show where the growth comes from.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T22:03:35Z.
Thanks for distinguishing record growth from the separate map rehash. The reported call sites are useful; the calculated next allocation sizes remain estimates. A focused source-built diagnostic would count new unique view records by slot and record the vector capacity and hash bucket count before growth. Please compare repeated identical descriptors with a controlled stream of distinct descriptors and keep both results under a bounded commit budget. This can identify the growth path without changing when a live descriptor can be rebound. The worker’s allocation-failure recovery is a separate acceptance item.
Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-25T22:58:02Z.
I ran the per-slot count you described, plus two one-off looks: at the record contents (run 1) and at the calls that create buffer SRVs (run 2). In run 1 the records are almost all slot 18 (SRV).
Setup (run 1):
fb2f86acplus two local, unpublished patches (the census, and a one-time dump of records), Release stand-ins, 24 GiB job cap. Switches:-Render -Translate -FakeUser -GpuMirror -StartupBelow40 -ContinueAsserts 1000, withX2W_XMEM_LAZY_COMMIT,X2W_XMEM_LAZY_STARTUP,X2W_D3D12_RELEASE_RETIREDandX2W_D3D12_BUDGETset to1. The shader cache was kept from earlier runs. One run, not reproducible from this repository. I stopped it on request at 421 s, after the dump. I found no0x8007000ein the log.Last census line:
Window: records with ids 2,000,000 to 3,999,999. 1,993,823 of them are buffer SRVs, and 1,986,012 of those (99.6%) name the same resource.
Distinct keys among the buffer SRVs, after zeroing the bytes that the desktop D3D12 layout does not use:
NumElementsFirstElementSo in this window the variety comes mainly from the range of the view,
FirstElementabove all. Ignoring these fields is only an analysis step: views with different ranges are different views.Unused bytes: of the 1,999,989 SRV records in the window, 406,399 (20.3%) differ from an earlier record only in bytes the desktop layout does not use.
note_viewhashes the whole captured description, so these get separate ids. I assume the description passed in follows the desktop layout; I have not checked that these bytes have no meaning on the console side. Removing these duplicates would still leave most records in this window distinct.Run 2: calls. Same base commit and switches, with the census and a local patch that records every slot-18 buffer SRV call, repeated ones included, with its thread, frame and call stack. I stopped it on request at 350 s, after the recording; I found no
0x8007000ein the log. The window is 4,000,000 calls over 639 frames, starting at 3,000,000 records. 3,993,181 of them (99.8%) name one resource; the figures below are for that resource.There are 2,027 distinct stacks overall, and the most frequent one covers 2.5% of the calls. A and B may be shared helpers; I have not looked at the code, and I have not verified that the captured stacks are correct at every level. I'm not including addresses.
So in this window, most of a frame's ranges were not in the previous frame, while the stand-in keeps every record. They may still come back from older frames. This does not show when a record stops being needed: descriptors that carry its id can be copied through title memory.
Limits:
Census: I have it locally as an opt-in switch (
X2W_D3D12_VIEW_CENSUS=1): new records by slot, and vector capacity and bucket count logged before a predicted growth. It has a fixture that compares repeated and distinct descriptors under a job commit limit, with a switch-off case and a negative control. It passed on WARP and on an RX 9070 XT (driver 32.0.32029.2010, Windows build 26300, debug layer off). The fixture covers slots 17, 18 and 22, not 19 to 21. It does not cover the worker's allocation-failure recovery. I can open a PR for it if that is useful.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T23:12:14Z.
Please open the focused census PR. The two samples make a useful distinction: the calls are mostly buffer SRVs for one resource, and different
FirstElementranges explain much of the ID growth. The samples do not establish how much process commit those records account for or when an ID can be retired. Keep the range, format, stride and flags in identity. Keep the opt-in counters, switch-off case, bounded repeated-vs-distinct fixture and its negative control. The scope can stay slots 17, 18 and 22. Please leave the record dump, stack collection, lifetime policy and worker recovery out of this PR.Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T23:43:07Z.
@JVProg, R0Y00 kept the worker's allocation-failure recovery out of your census PR as a separate acceptance item. If you plan to do it yourself, I'll leave it; otherwise I'd like to take it.
Scope:
view_recordsorview_idsinnote_viewfails, the call reports a named failure and the process keeps running, with no further allocation on the faulting path and no stack overflow (0xc00000fd).Evidence: a source-built fixture under a Windows job with a low commit cap (or an opt-in fault-injection switch), on WARP and an RTX 3070, plus your #2613 census checks and the DirectStorage allocation-failure checks re-run. Negative control: the same fixture without the change must stop as before.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T23:53:33Z.
The worker recovery is the next separate implementation slice. Please coordinate with @JVProg on the existing claim. For the source-built control, inject failure into the two growth sites separately and check that a failed descriptor publication leaves previously published IDs readable, does not leave a partial record/index pair, and permits a later valid descriptor. A deterministic, bounded injection is enough for this slice. Keep the matched commit-budget replay here as separate evidence for the later loading stop.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T00:35:25Z.
Another data point at a newer revision, including a paired run with both lazy-commit switches.
Build and environment:
mainatd371ce46,releasepreset. Windows 11 Pro 26300.9974, AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088, debug layer off). About 19 GB of physical memory was free before each run.Command: same switches in all three runs, with the title driven by a controller (no input script):
Process commit (
PagefileUsagefrom the DirectStorage heartbeat, MiB; heartbeat time base):-MemoryGiB 12-MemoryGiB 20-MemoryGiB 20,X2W_XMEM_LAZY_COMMIT=1andX2W_XMEM_LAZY_STARTUP=1The jump around 70-80 s comes as the menus hand over to loading; the second one around 110-130 s is during loading. All three runs stopped at the same visible point: after the loading screen, on the first prologue screens, which were full-screen magenta (see #870).
First failures in each run:
_aligned_mallocinwrap(). Reported separately as #2653.XMemMapPhysicalPagesScatterfailed with 1455 (stage=map-view). Then a package BVH-builder DLL took two C++ exceptions from desktopD3D12.dll/D3D12Core.dlland stopped on a null write.CreatePlacedResourceXtexture placements returnedE_OUTOFMEMORY(0x8007000e), followed by the same BVH-builder stop.What the lazy switches changed here: about 2.2 GiB less commit at the start (3.1 against 5.3 GiB) and through the menus, but about the same during loading (19.4 against 20.2 GiB at the last sample). The stop moved from 187 s to 194 s, and the first failure moved from the xmem map to D3D12 placement. A repeat of the lazy-commit run stopped at the same instruction at 225.9 s, with 8
E_OUTOFMEMORYplacements and 19,163 MiB at the last sample. Its loading jump started about 80 s later (more time spent in the menus), so the stop follows the start of loading rather than a fixed time.Not measured: local video-memory budget and usage (no
X2W_D3D12_BUDGET=1), and system-wide commit. I can add both on the next run if that helps.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:53:48Z.
Please include system commit/limit and local DXGI current usage/budget in the next matched pair. Use the same cap, revision, cache, profile and input in both arms. Capture those counters immediately before the first loading failure, plus process commit and the exact failing return code. The 12 GiB wrapper failure already has its own fix candidate #2656. The two 20 GiB runs moved the first failure from page mapping to D3D12 placement with similar late commit, so keep those stages separate when reporting the result.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T01:03:52Z.
Matched pair as requested: one variable (lazy commit), everything else the same.
Shared setup. Release build of
d371ce46(without #2656). Windows 11 Pro 26300.9974, RTX 4090 (driver 32.0.16.1088, debug layer off), Ryzen 9 7900X, 32 GB RAM, system commit limit 97,956 MiB.-MemoryGiB 20(20,480 MiB). Each arm started from its own copy of the same saved-profile snapshot and the same shader cache snapshot, with no translation during the run (no-Translate). Both used the same input script, A every 4 s from 4 s to 200 s after the first input poll (4@4,4@8,...,4@200), with no manual input. The title read 14 presses in each arm.With
X2W_D3D12_BUDGET=1in both arms, andX2W_XMEM_LAZY_COMMIT=1withX2W_XMEM_LAZY_STARTUP=1in arm B only. System commit, commit limit and process private commit were sampled once a second from outside the process (theMemoryperformance counters and the process's private bytes).Counters before the first loading failure:
x2w-render list Close failed 0x8007000e(2 lines)Device::slot133(CreatePlacedResourceX?)texture, 4096×4096, 11 mips ->0x8007000e(9 lines)XMemMapPhysicalPages*14550x24) in the title's own codeOnly the job cap was reached. System commit stayed at 55% of its limit, and DXGI local usage at about half its budget in both arms.
Process private commit over time (outside sampler, MiB; process seconds):
Arm B reached its first input poll 12.4 s earlier (30.0 s against 42.4 s), so its curve runs about 12 s ahead. Lazy commit saved about 2.2 GiB before the menus and about 1 GiB through them. Both arms then climbed to the cap within about 25 s of the loading start.
Stages, kept separate:
CreatePlacedResourceX): first in arm B, and in both earlier lazy runs.Close(E_OUTOFMEMORY): first in arm A. This stage was not seen before. It was followed by a null write in the title rather than the BVH-builder stop.So without lazy commit, the first failure at the cap has now differed between two runs (1455 before, list
Closehere). With lazy commit it was D3D12 placement in all three runs. One run per arm here; I have not repeated arm A.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T01:12:16Z.
The matched pair narrows this to the 20 GiB process job cap on this host. The last private-commit samples were 20,455 and 20,405 MiB. System commit and both DXGI budgets still had headroom. With lazy commit off, the first reported failure was
ClosewithE_OUTOFMEMORY; with it on, the first was slot 133 texture placement with the same HRESULT. Neither arm emitted the earlier page-map 1455. That is useful attribution even though the two runs reached loading at different times.The next useful comparison is by loading phase and allocation class. If you already have the budget traces, please align the two arms at the first loading request and summarize which tracked allocations grew before the failed call, alongside the last private-commit sample. A category with no counter can stay unknown. Keep the 20 GiB cap fixed. The merged #2656 is a separate error-handling fix for the 12 GiB wrapper crash; #1199 stays open for the growth seen here.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T01:19:40Z.
Aligned from the existing traces of the same pair (
d371ce46, 20 GiB cap,X2W_D3D12_BUDGET=1, A without and B with lazy commit). Eachx2w-budgetline is attributed to the DirectStorage heartbeat before it in the log, so times are on the heartbeat clock, not process seconds. Values are MiB, and each category is live + retained.Alignment point. In both arms, committed textures sat at 4,318 + 98 MiB through the menus. I took the first heartbeat where that grew as the start of loading: A at 80 s, B at 50 s. The row before it is the baseline.
Phase 1, before loading (the earlier 5 → 12 GiB step): process commit went from 5,341 to 12,109 MiB in A, and from 4,901 to 11,167 MiB in B. In the same interval,
live physical-page sectionswent from 102,736 to 113,609, and everyx2w-budgetcategory stayed the same. This step is title memory through xmem, which has no byte counter in the budget line, so its split stays unknown here. The section count did not change again before the failure in either arm.Phase 2, loading start to the last sample before the first failed call:
Close→E_OUTOFMEMORYE_OUTOFMEMORYWhat grew. Committed textures account for about +5.8 GiB in A and +6.1 GiB in B, and more than half of that is the retained column: textures the title has released whose desktop objects the stand-in still holds. That matches #2379. Upload buffers add about 0.5 GiB. Committed buffers, placed resources, heaps and the xmem sections add little or nothing. The tracked categories sum to about +6.5 GiB (A) and +6.8 GiB (B) against +8.0 and +8.2 GiB of process commit, leaving about 1.5 GiB in each arm with no counter. These runs do not establish how much of the texture growth is charged to process commit rather than only to local video memory; DXGI local usage rose by about the same amount as the texture categories.
Both arms ran without
X2W_D3D12_RELEASE_RETIRED. A matched run with it, at the same 20 GiB cap, would show how much of the retained growth comes back. I have not run that yet.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T01:27:57Z.
Follow-up to the allocation-class alignment: a new matched pair at the same 20 GiB cap, varying only the retired-resource release.
Setup. Release build of
mainatf4c6998a. Windows 11 Pro 26300.9974, RTX 4090 (driver 32.0.16.1088, debug layer off), 32 GB RAM, system commit limit 97,956 MiB. Both arms started from copies of one saved-profile snapshot and one shader-cache snapshot (revision 17, translated offline first), with no translation during the run, lazy commit off,X2W_D3D12_BUDGET=1, and the same input script (A every 4 s from 4 s to 200 s after the first poll, no manual input).Arm D adds
X2W_D3D12_RELEASE_RETIRED=1,X2W_D3D12_RELEASE_RETIRED_VIEWS=1and the diagnosticX2W_D3D12_RETIRE_REASONS=1.Result (times on the DirectStorage heartbeat clock unless marked as process seconds; MiB):
0x8007000e(8 in total)ExecuteIndirectforwardedOn screen, arm D got noticeably further than arm C, through to later credit cards. Both showed a solid red background where
d371ce46had shown magenta. I have not looked into what changed between the two revisions.Where the commit went. Sum of the tracked
x2w-budgetcategories (live + retained, all six) against process commit, from the last menu sample (20 s) to the last sample:With the release on, the tracked categories peak early (13,896 at 30 s) and then stay roughly flat, while process commit keeps rising for another 110 s. The physical-page section count stayed at 113,609 throughout in both arms. So once retained textures are released, most of the remaining growth to the cap is outside the six budget categories and outside the xmem section count. It could be title heap memory, the stand-ins' own heaps or driver allocations; these runs have no counter for it.
At the stop, arm D's retire-reasons line still held 484 MiB: 5,163 buffers (339 MiB, outside the release class), 11 render-target, depth or UAV resources (144 MiB), 4 of another dimension (0.25 MiB) and 1 texture with a live view (1.4 MiB). Upload buffers grew 626 → 982 MiB over the same interval.
One run per arm.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T01:33:37Z.
The
f4c6998apair gives us a useful split. The release options lowered retained committed textures from 3,563 to 143 MiB and extended this run from 69.7 to 155.2 s. Both arms still hit the 20 GiB process-job cap at slot 133 texture placement withE_OUTOFMEMORY. The section count was unchanged and neither arm forwarded indirect work. I’m keeping this open for the roughly 3 GiB growth outside the tracked categories in the release-on arm. The results in #2379 establish lower retention, with the live-view lifetime guarantee still in force.For a follow-up, one bounded release-on run can use the existing budget timeline as its anchor. At two comparable loading landmarks, record the committed-byte deltas for private heap and mapped regions separately, and the first large growing aggregate if the sampler can identify it. Keep paths, addresses and raw captures local. That would help aim the next source-built allocation fixture at a specific class.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T01:43:50Z.
One bounded release-on run with the split you asked for. Same setup as arm D of the
f4c6998apair: 20 GiB cap,X2W_D3D12_RELEASE_RETIRED=1,X2W_D3D12_RELEASE_RETIRED_VIEWS=1,X2W_D3D12_RETIRE_REASONS=1andX2W_D3D12_BUDGET=1, lazy commit off, the same profile and cache snapshots and the same scripted input.Sampler. A separate process walked the title's address space with
VirtualQueryExevery 5 s. It read no memory contents. It summed committed bytes by region type (private, mapped, image) and kept per-allocation committed bytes for allocations of 1 MiB or more. A walk took 0.6-1.4 s. Private here is committedMEM_PRIVATE; it runs about 0.2-0.5 GiB below the private-bytes counter, which also includes copy-on-write image pages. Process heaps were matched by base address from the toolhelp heap list. That matched only about 1 MiB, so I cannot separate heap from other private allocations from outside the process. In what follows, "private" means allMEM_PRIVATE.Alignment. Process seconds. Matching process commit puts the DirectStorage heartbeat clock about 6-8 s behind process time in this run. Landmark 1 is the last menu sample before the loading step (25.9 s). Landmark 2 is where commit levels off after that step (51.5 s). The run stopped at 173.6 s. The last sample before the stop was at 171.7 s.
MEM_PRIVATE)MEM_MAPPED)The mapped views are all under 1 MiB: about 170,000 at the first landmark, 221,000 at the second and 222,000 at the end. The added views appear while the section count stays the same, so they look like more views of existing sections (for example the GPU-view mirror). Their commit is charged to the sections, not to process private commit.
Private growth by allocation (allocations of at least 1 MiB):
So the first large growing aggregate is a burst of new 4-64 MiB private allocations (mostly 32 MiB) at the loading step. After that the largest single item is one 851 MiB allocation. I cannot attribute either to a module from outside the process. Over the first interval, the tracked
x2w-budgetcategories grew by about 3.6 GiB (mostly live committed textures, plus 0.5 GiB of upload buffers), and DXGI local usage rose by about 3.0 GiB at the same time. So the private allocations are probably not the committed textures themselves, but these runs do not show that. A stack for the first 32 MiB and the 851 MiB allocation would be the next step.Stop. This run did not stop at slot 133 placement. No
E_OUTOFMEMORY, 1455 or wrapper failure was logged. At 173.6 s an unhandled C++ exception was thrown fromd3d12_xs.dll, and its throw information namesstd::bad_alloc. Private bytes were 19,980 MiB (cap 20,480). So a C++ allocation inside the stand-in failed at the cap and the exception left the stand-in uncaught, which is a separate error-handling gap next to #2656. The run forwarded noExecuteIndirectwork; 7.1 M mesh and 2.3 M compute dispatches were refused.The sampler and the per-allocation data stay local. One run.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T02:00:39Z.
The two loading landmarks separate the large private allocation burst from the mapped-view growth. After the second landmark the measured private regions grew by another 3,279 MiB while mapped regions grew by 72 MiB and the section count held. The final
std::bad_allocis a different first error from the prior slot-133 and wrapper failures. This sample does not yet identify the 32 MiB allocations or the 851 MiB allocation.For the next bounded replay, the highest-value evidence is the first repo-owned caller above the failing allocation and whether it escapes an exported call or a worker entry. If available, include only symbol names for a representative 32 MiB allocation and the 851 MiB allocation. Keep stacks with addresses and raw traces local. Those names will let us target allocation failure injection and verify the caller's output and lifetime rules, as #2656 did for wrappers.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-26T06:46:36Z.
Measured WDDM2 commit behavior and
X2W_XMEM_LAZY_COMMIT/X2W_XMEM_LAZY_STARTUPon a 16 GiB Windows 11 host (NVIDIA GeForce GTX 1660 SUPER, driver32.0.16.1074,DedicatedVRAM=5966 MiB,SysCommitLimit=22931.80 MiB) ate3cf6a91/e6902a11, and found why 16 GiB hosts still exhaust system commit during heavy startup loads even with the existing lazy switches:1. Why commit jumps +5 GiB during texture/buffer placement (standalone D3D12 micro-probe)
A standalone x64 probe on the GTX 1660 SUPER measuring
GetProcessMemoryInfo().PagefileUsageandGetPerformanceInfo().CommitTotalbefore/after D3D12 operations shows:CreateCommittedResource(D3D12_HEAP_TYPE_DEFAULT)charges ~1:1 to BOTHPagefileUsageandSysCommit(64 × 8 MiB = 512 MiB textures →Pagefile +514.93 MiB,SysCommit +519.47 MiB,Local +512.00 MiB). CallingEvict()freesLocal(-> +0.00 MiB) without releasing anyPagefileUsageorSysCommit(+514.93 MiB/+519.47 MiBunchanged).D3D12_HEAP_FLAG_CREATE_NOT_RESIDENTalso charges+513.01 MiBPagefile/+513.68 MiBSysCommitimmediately atCreateHeaptime.Local,Pagefile, andSysCommit(512 × 4 KiB =2 MiBlogical →Local +32.00 MiB,Pagefile +33.89 MiB,SysCommit +31.70 MiB). Suballocating in a single buffer drops this to+2.00 MiB.OpenExistingHeapFromAddresspins 100% of the allocation inWorkingSetSizeand DXGINonLocaleven on untouchedMEM_COMMITpages (256 MiBVirtualAllocwithWS +0.00 MiB→ immediatelyWS +256.03 MiB,NonLocal +256.00 MiBonOpenExistingHeapFromAddress).2. Specific remaining XMem/D3D12 gaps found in code
commit_startup_blockdisablesX2W_XMEM_LAZY_STARTUPwhenX2W_XMEM_STARTUP_BELOW_40=1is active (src/xmem_mapped_pages.cpp:1788,!below_40), leaving0x283large-page pool blocks eagerly committed up front.slot 133callsx2w_local::commit_lazy_block(address)unconditionally (src/startup_stubs/d3d12_xs_device.cpp:4958) before checking(offset & 0xFFFF) == 0 && range.covered && range.type == MEM_PRIVATE, forcing whole multi-GiB lazy startup blocks to commit in full even when a tiny unaligned buffer falls back toCreateCommittedResource.4096 × 64 KiB= 256 MiBSEC_RESERVE) never close their section handle onXMemFreePhysicalPages(src/xmem_slab_slots.h,src/xmem_mapped_pages.cpp), pinning commit at the high-water mark until process exit.X2W_XMEM_LAZY_COMMIT=1+X2W_XMEM_LAZY_STARTUP=1+X2W_XMEM_SHARED_VIEWS=1one6902a11(same 16 GiB host): earlyPagefileUsagedropped from6,736–6,847 MiBdown to3,875–4,991 MiB(-1.9to-2.9 GiB), then jumped+5,149 MiB(5,912 -> 11,061 MiB) as soon asslot 133created ~4.16 GiB of read-only textures and ~900 MiB of un-aliased committed buffers (whiletextures uploadedstayed0).Filing separate narrow issues for the D3D12 lazy-texture and
slot 133heap-cap slices, and working on the XMembelow_40lazy + slab reclamation slice under#1199.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T07:35:35Z.
#2770 landed at
f30a9e3a. The source-built below-40 startup block stayed reserved until touch, the synthetic slab returned 64 MiB of system commit in one serial run, and the in-flight lease regressions passed on WARP and RTX. This gives #1199 a matched replay to run on the existing 16 GiB report host. If you can, keep the save, adapter, page-file limit and other startup switches fixed. Compare the old and new builds with the same lazy-memory flags. Report commit immediately before and after each existing loading landmark, whether slab/slot counts fall after release, and the first failing call or last verified stage in each run. A run without the new lazy flags is the control for the startup-block part. Keep raw traces local. The slot-133 changes in #2764 and #2765 remain separate.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T09:30:05Z.
The 16 GiB report now includes a main-only run at
d1b2be6a. On the GTX 1660 SUPER host, it reported 180 seconds, 3,260 storage requests, a peak host commit of 11,053 MiB, and zero mapping-failure/device-removal/out-of-memory lines during that window. Original report in #2780The 8,787 MiB number comes from a separate 300-second experiment with additional changes and the existing-heap cap enabled. #2775 has landed with that cap opt-in because the default needs to preserve alias-backed consumers. Please keep this issue open until a matched same-window replay on the 16 GiB host verifies the loading boundary with the cap unset. The cap-on run can remain a separate pressure comparison with its publication limits called out.
Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-26T09:57:26Z.
@roansystemlabs Thanks for asking. I plan to do this one myself.
From reading
note_viewonmain(b2cf7dc5), without running anything yet: besidesview_recordsandview_ids,view_materializedalso grows, so I plan to inject a failure there too.view_idscan also allocate on an ordinary insert, not only on a rehash.Plan:
The
Create*Viewcalls returnvoid, so my plan is to report the failure as a named log line. I also need to check what the destination descriptor slot and the resource lifetime tracking should hold after a failed publication.I will test on WARP and an RX 9070 XT. I don't have an RTX 3070. The matched commit-budget replay stays separate and is not part of this change.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T13:56:57Z.
Data point from a second machine (Windows 11 25H2 26200, MSVC 19.42, dev preset, NVIDIA GeForce RTX 4070 Ti driver 621.35 / 32.0.16.2135, hardware backend). With the default
run.ps1job cap (-MemoryGiB 14), process commit (PagefileUsage) reached 12.8 GB at 110 s with 113,609 live physical-page sections. At about 125 sCreatePlacedResourceXreturnedE_OUTOFMEMORY, DirectStorage requests failed with out of memory and the page-batch mapping (queue slot 31) returned0x800705af. On a build before #2727 this ended in a null wrapper write in the memory-SRV path; #2727 removes that crash.The same input with
-MemoryGiB 24on7256cecf(with #2823 reverted locally, see #2837) had 0 out-of-memory failures, and process commit peaked at 17,563 MiB at 230 s. Adding-StartupBelow40(#1758) the run reached the 900 s limit with no stop. So on this machine the 14 GiB default cap is the limit, and the loading phase needs roughly 17–18 GiB of commit.AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-27T16:33:34Z.
Follow-up to my sampler comment and to the request for the owners of the 851 MiB allocation and of a 32 MiB one. I still have no stacks. Both attributions below rest on other evidence, described with each.
Setup.
de1595b9, Release stand-ins, Windows 11 build 26300.9974, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), 32 GB host, commit limit 49.7 GiB. Switches:-Render -Translate -FakeUser -GpuMirror -StartupBelow40 -ContinueAsserts 1000, 24 GiB job cap, lazy commit off,X2W_D3D12_BUDGET=1,X2W_D3D12_DEBUGnot set. Warm shader cache and the same scripted input in every run. Times are process seconds.X2W_D3D12_RELEASE_RETIRED=1andX2W_D3D12_RETIRE_REASONS=1All four ran to their time limit and logged no
E_OUTOFMEMORY.The 851 MiB allocation is
view_records. In runs C and D a second local process waited until the block had kept its size for two samples, then read 512 bytes from 64 MiB into it. The bytes are records of 112 bytes, and every field lines up withViewRecordind3d12_capture.inl, whose size is also 112:idcounts up by one per record and equals the record's index in the block;slotis 18 in every record read;desc_bytesis 40;descholds a buffer SRV description with the default component mapping.The block grows the way an MSVC vector does. In run C it was 252 MiB at 90 s, 378 MiB at 107 s and 567 MiB at 131 s, and in run D it was 851 MiB at 235 s. Each step is 1.5 times the one before, and old and new blocks both exist while the records are copied. From the two steps in run C the list passed 2.36 million records at about 107 s and 3.54 million at about 131 s, which is roughly 49,000 new records a second (the sampler ticks every 5 to 6 s, so that rate is approximate).
In the bytes read, consecutive records name the same resource and differ in the first element of the buffer view. Those are distinct descriptions, so the shared-id rule in
note_viewdoes not merge them. I did not runX2W_D3D12_VIEW_CENSUS, so I have by-slot counts only for the two 512-byte samples, not for the whole list.The reader also searched the process for pointers to the first 256 bytes of the block and found none. The first page of the block was not readable, so the vector's data probably begins further in than I searched. The attribution therefore rests on the record layout alone.
The 16–256 MiB private allocations add up to the adapter memory in use. Run A, with the same kind of outside sampler as in my earlier comment (15 s interval), set against the
x2w-budgetline nearest in time:local+nonlocalminus the explicit heap (MiB)The explicit heap (1,277 MiB, one object) is subtracted because it appears as its own allocation above 256 MiB. Over the whole run the two columns stay within about 0.3 GiB of each other. This is a fit from one run, and it agrees with the probe result above that default-heap committed resources charge
PagefileUsageone for one. I did not take a stack for a single 32 MiB allocation. It does correct my earlier guess that the private allocations were "probably not the committed textures themselves".Release pair, A against B. Last sampler row and budget line before the time limit:
textureretainedtexturelivelocalnonlocalB uploaded about twice as many textures as A (3,101 against 1,529) and presented 3,884 frames in 204.5 s against 4,156.
The retire line in B attributes everything still held:
view-refs585 objects and 945 MiB, all of themview-refs-in-visible-heap;never-class:buffer6,194 and 420 MiB;never-class:rt-ds-uav14 and 172 MiB;never-class:dimension4;unattributed0.What still grows in B. Commit rose from 15,320 MiB at 90 s to 17,388 MiB at 210 s. Over that stretch
nonlocalgrew from 4,428 to 5,373 MiB while retained buffers grew by about 0.24 GiB, so most of thenonlocalgrowth is outside the tracked categories. The private allocations above 256 MiB grew by 851 MiB, which is theview_recordsblock.Limits. One run per arm, one host, one adapter. The
view_recordsidentification comes from memory contents, not from a stack or symbols. I did not measureview_idsorview_materialized. The readers, the dumps and the per-allocation data stay local.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-27T18:59:32Z.
The
note_viewrecovery from #2799 ran in a startup run of the main executable, and the process kept running.Setup:
429f11d5,releasepreset. Windows 11 build 26300.9974, default adapter (the PC has an RX 9070 XT, driver 32.0.32029.2010, and a Radeon iGPU; the log does not name the one used), D3D12 debug layer not enabled.run.ps1with-Seconds 0 -Render -Translate -FakeUser -ContinueAsserts 1000 -GpuMirror -MemoryGiB 30 -StartupBelow40, andX2W_XMEM_LAZY_COMMIT,X2W_XMEM_LAZY_STARTUP,X2W_D3D12_RELEASE_RETIRED,X2W_D3D12_BUDGETandX2W_D3D12_RING_RELEASE_AT_SUBMITset to1. Re-keyed shader cache, kept from earlier runs. One run.Observed:
x2w-d3d12 note_view: out of memory in view_records -> view of slot 18 not recorded, destination descriptor untracked(8 lines; this message is capped at 8).ThrowInfoind3d12_xs.dllnamesstd::bad_alloc.views distinctstayed at 17,937,983 for the last nine 5 s reports, whileviews notedkept rising. That number is one of theview_recordscapacity steps. The next one, 26,906,975 records of 112 bytes, needs a 2,874 MiB block. The last heartbeat showed 28,024 MiB current commit, and the job peak was 30,923 MiB against a 30,720 MiB cap (I infer that the peak includes the refused request).Where the exceptions come from: first-chance events carry no stack. One thread was inside a throw in the thread dump taken at the stop:
operator new→store_view(d3d12_capture.inl:388, theview_recordsgrowth) →note_view. I resolved it with a separate PDB build of the same commit (.texthas the same size and differs in 188 bytes). Together with the frozen count, this points tonote_view, but I have not shown it for each of the 448,366 exceptions.Limits: this shows only that the process survived the failed view allocations. It does not fix the memory growth, and I did not measure the effect of the untracked descriptors or of the exception volume on the picture or on performance. The run lasted only about 46 s after the first of these exceptions.
AI was used.
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-28T12:54:48Z.
Two additions to the
view_recordsgrowth analysis above, measured on currentmain(after #3211).1. CBVs now add about 30% of the new records. #3211 routes the title's CBV creation through the shim. JVProg's census before it had CBV = 0; with it:
X2W_D3D12_VIEW_CENSUS, 250 sEach CBV names a new GPU address and size. In a second run, 15% of the new CBV records (233,762 of 1,536,227) differed from an earlier one only in bytes 12–15, which the desktop layout does not use. For buffer SRVs the share was 23% (719,107 of 3,180,798), in line with the 20.3% above.
2. The growth also costs CPU time, on
note_lock. Local timers around each acquire and release, 100–175k inflated blocks:note_view, exclusivenote_copy, exclusivenote_viewcalls change the slot (a new record, or another record into the slot), so they need the exclusive lock. The readers (resource_info222k/s,resolve_title_table132k/s,placed_buffer_range120k/s,memory_srv_destination101k/s) queue behind them.note_copycalls but only ~10% ofnote_viewcalls are unchanged. In an A/B/B/A it saved about 0.07 threads, with no fps change.Setup:
main3926a289+ #3097, Release, Windows 10 22H2, i7-4790K, RTX 3080 Ti, 16 GB. Switches:X2W_PROBE_PRECHECK=0,X2W_D3D12_RELEASE_RETIRED,X2W_D3D12_RING_RELEASE_AT_SUBMIT,X2W_D3D12_TABLE_ALIAS,X2W_D3D12_ROOT_SRV_AT_DRAW,X2W_D3D12_VIEW_TOKEN_GUARDED,X2W_D3D12_BUDGET. Warm shader cache, scripted input. The lock timers and the padding count are local, unpublished patches; the timers slow the run by 1–3 fps, so the absolute µs are a little high. One run per measurement. Counts only.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-28T16:18:23Z.
#3377 adds an opt-in record lifetime for the two views that make up most new records here (buffer SRVs and CBVs):
X2W_D3D12_VIEW_CONTENT_TOKENS=1writes those views into title memory as tokens that carry the view instead of a record id, so a copy the title makes with its own memory copy needs no record, and the record can be freed once no shadow slot names it. Range, format, stride and flags stay in the identity.An 800 s run with it set ended with 388k records and no device removal. Textures and other views keep id tokens and are still never freed.