A view the title places off its buffer copy's elements gets a host copy of its own bytes (`shadow::exact`), and each was a committed buffer of its own: a kernel call to make it (and one to free it) on the title's recording threads and on the submitting thread during heap syncs, 240-820 a frame in the cutscene, and 64 KiB of memory each for ~2 KB of data (~5,000 live). A stack sample of a `drops` run caught the submitting thread in that kernel call inside the heap sync, which holds the heaps' lock, while three title threads waited for that lock to write views. Such copies now take runs of shared 16 MiB buffers (first fit; a run starts at a multiple of the view's element and of 256 bytes, so the view's first element stays exact; a copy larger than a buffer gets one of its size); a run goes back, joined to its free neighbours, when its copy goes. A host copy knows where it starts in its buffer (`offset` adds it; its mapping and host address point at the run), so the views made over it are unchanged. Copies are now keyed by element size too. Test: runs are aligned to their elements, disjoint, and joined again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6cc6aa3525
·
2026-11-25 05:58:58 +01:00
History