Ask for the C runtime heap's summary before play only.

The memory report's system line asked for the heap's summary at every report until one was slow. The summary holds
the heap's lock, and every malloc of every thread with it, while it adds the heap up: 54 and 70 ms in two sessions
on an RTX 5090 PC, and the frame of the first report, 30 seconds into each session, took 55 to 82 ms, the longest
frame of play in both. One slow summary switched the question off, so every session paid for it once.

It is now asked for before play only (the boot and the title screen), and at every report with mem_census = 1,
which already accepts a late frame for the walk of the address space. In play the line gives what the runtime knows
it allocated, the same figure from one report to the next. The rule is in runtime/vk_mem_heap.h with
tests/mem_heap_check, which fails against the rule before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-14 08:53:26 -05:00
parent 1e8045b36b
commit 7432f7375c
6 changed files with 122 additions and 6 deletions

View File

@@ -1104,7 +1104,9 @@
# stands in for it) and where its committed memory lies every 3600 frames, and when the process's own commit (without
# the video memory Windows charges to it) rose 1 GiB over the highest it was, at most once a minute (the "commit
# census" lines). Each walk holds the address-space lock for 100-260 ms and delays the next frame by as much, so they
# are off unless asked for: leave it off in a run whose smoothness is judged.
# are off unless asked for: leave it off in a run whose smoothness is judged. With or without the trace, 1 also has
# every memory report ask for the C runtime heap's summary in play, which holds every allocation of the game for as
# long as it takes (50 to 70 ms with a heap of a few GB); without it the summary is taken before play only.
# mem_census = 0
# 1: with trace = perf, the process's handles counted by kind (events, sections, threads, files...) at the 600-frame
# report when their number grew by 16 or more since the last count (the "mem: handles" line). It reads the system's