Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Idle memory and visible-grid storage

Measured 2026-11-06 with release x64, WARP, Cascadia Mono v2407.24 sidecar, 80×24, three seconds after startup, interactive user Sal. Win10 runs cmd.exe; Win7 displays the ConPTY-unavailable message. MiB means 1,048,576 bytes.

Reproduce

export PATH=/nix/store/2g8sjq53xas3fplx76hvm2nrk2sslbrz-zig-0.17.0/bin:$PATH
cargo xtask vm-memory

The suite runs both guests via schtasks /it, deploys sidecar fonts, collects idle and tall snapshots, and restores the original display mode after the child exits. It temporarily selects an advertised mode at least 1440 lines high because the normal 1600×900 desktop restricts a resizable window to about 46 rows. It never reboots a guest. Reports are build/vm-desktop/{win7,win10}-memory-{idle,tall}.txt; private bytes and desktop dimensions are in the command output. Save that output separately when comparing runs: the shared desktop harness overwrites its log.

--diag-file PATH enables diagnostic snapshots. Each snapshot also writes PATH.memory.txt. Rust's global allocator counts live requested bytes, including successful reallocations; Ghostty's custom allocator independently counts its live requests (a subset of Rust's total). HeapWalk, under HeapLock, counts process heap busy/free bytes and block overhead. VirtualQuery sums committed private, mapped and image regions. None of these paths runs on the normal idle timer. The external probe obtains PrivateUsage with GetProcessMemoryInfo.

PrivateUsage, committed MEM_PRIVATE and working set are different measures. Image copy-on-write pages can contribute to PrivateUsage; entire read-only mappings and images must not be added to it. Heap busy includes libraries using the process heap directly. Counters are sequential snapshots, not an atomic process freeze.

Before and after

MeasurementWin7Win10
Owner's initial idle private bytes, approximate MiB3642
Measured final idle private bytes28,213,248 (26.91 MiB)39,292,928 (37.47 MiB)
Final live Rust requests14,149,92814,219,705
Final committed private regions27,189,24837,564,416
Final process heap busy23,584,11016,840,979
Final process heap free510,240557,728
Final heap block overhead65,44264,717

The initial figures were supplied with the task, not obtained by this census. There is no controlled same-harness pre-change process snapshot: the initial attempt was stopped because an outer lock and the harness's individual-call lock blocked each other. Subsequent builds already included the cache reduction and concurrent latency changes. The 9.09/4.53 MiB differences are descriptive, not an isolated causal benchmark. Win7 repeat final-style runs ranged 26.8–27.2 MiB; a final repeat measured 28,147,712 bytes (26.84 MiB) on Win7 and 39,346,176 bytes (37.52 MiB) on Win10. Both guests explicitly passed the original-display-mode restoration assertion.

The exact row-cache reservation reduction is independently reproducible from its capacity counters/tests: 7,040,928 → 871,296 bytes, saving 6,169,632 bytes (88%).

Attribution and budgets

These are idle targets for 80×24, not runtime failure thresholds. Scrollback, new fonts, new glyphs and resizing legitimately increase live storage.

Owned allocation / sourceWin7 bytesWin10 bytesIdle budget
Ghostty terminal, screen pages and scrollback combined137,015137,1850.25 MiB; grow with actual history
Row cache871,296871,2961 MiB
Visible per-row instances2,949,1202,949,1203 MiB
Frame instance scratch2,973,6962,973,6963 MiB
CPU R8 atlas4,194,3044,194,3044 MiB
CPU RGBA atlas262,144262,1440.25 MiB
Screen cells and reserved grapheme strings583,680583,6800.6 MiB
Font-system configuration retained allocation delta39,32739,3270.1 MiB
Frame-building retained allocation growth12,86116,8680.1 MiB at startup
Other live Rust requests, by subtraction2,126,4852,192,0852.2 MiB
Total live Rust requests14,149,92814,219,70514 MiB

The configuration delta brackets the entire font configuration call, after its locals have dropped; it includes cosmic-text/fontdb metadata and mapping owners. The build delta brackets frame building after Frame scratch allocation. It is a phase measurement, not allocation stack tracing: it includes cosmic-text shaping, font and Swash cache growth, and any other allocation during that phase. Swash image payload capacities are 2,079 / 2,982 bytes, already within these deltas, not additional storage. The other-Rust bucket includes GlyphRun, bidi and bitmap scratch, glyph lookup storage, render-state iterators, application/backend state, and vector metadata. Those individual capacities are not all separately logged. Ghostty's public allocator does not distinguish pages from terminal metadata or scrollback; that internal split remains unmeasured. No claim of a precise split between cosmic-text's private internal caches is made either.

Font data is mapped, not copied onto the Rust heap: platform fonts::map uses read-only CreateFileMapping/MapViewOfFile, Engine::from_shared hands its Arc to fontdb Source::Binary, and cosmic-text clones that Arc. The idle source-byte counter is 714,804 on both guests, exactly the variable Cascadia sidecar's size. Noto Emoji is not loaded in these idle runs (zero additional source bytes). Those historical runs shipped Cascadia only; the sidecar task now also ships Noto color and monochrome fonts. No font is embedded by Voyager7. A discovered Noto fallback uses the same mapped path. These observations do not measure private allocations caused by shaping or rasterizing an emoji; those appear in the text/cache deltas when exercised.

D3D requests an R8 2048² texture and RGBA 256² texture (4.25 MiB of texel payload), in addition to the CPU copies above. The instance buffer now follows submitted frame demand; the old renderer reserved 69,632 × 48 = 3,342,336 bytes regardless of grid size. Swap chains, render targets, WARP code/data and driver resources are owned by D3D/DXGI. Their committed allocation sizes are not exposed by our counter. The process-heap busy excess over Rust requests is 9,434,182 / 2,621,274 bytes; it is foreign process-heap allocation, not allocator overhead. The remaining PrivateUsage beyond all live Rust requests is 14,063,320 / 25,073,223 bytes and includes that foreign heap storage, heap slack, stacks, graphics allocations and private image pages. It is incorrect to label this entire residual “driver”. HeapWalk's measured 65 KB block overhead and 0.5 MiB free storage are lower bounds on allocator cost; heap segment/page slack is not separately attributed.

Provisional overall private-byte budgets are 30 MiB Win7 / 40 MiB Win10 WARP. Allow up to 1 MiB for block overhead plus retained free process-heap space at startup. Foreign graphics/OS cost gets the remaining approximately 16/26 MiB; that is a budgeting allowance, not a measurement of independent D3D ownership. An allocation-stack/heap-segment capture is still needed to divide the residual between D3D, WARP, driver and allocator slack. This census deliberately leaves that uncertainty visible rather than guessing attribution.

Changes and stopping point

RowCache now uses two circular payload arenas instead of reserving a maximum-size key and instance vector in every entry. The arenas reserve 32 key bytes and four instances per column per historical entry, with room for at least one maximum-size row. Full keys, maps and float instances are retained without quantization. Ring wrap invalidates overlapping entries before reuse. There is no miss-path Rust allocation. Ordinary rows retain two generations (at most 64 historical entries). Dense pathological rows evict history sooner; this is an explicit cache hit-rate tradeoff, not pixel loss. Currently visible rows remain in their own frame buffers. Wraparound/overlap, relocation, footprint, and zero-allocation cached-frame checks cover this behavior. No universal frame-time equivalence is claimed for dense rows.

Further shrinking the CPU mask atlas would reduce glyph capacity and force atlas rebuild/eviction; removing its CPU copy would change dirty upload and test paths. Shrinking visible/frame instance bounds or grapheme storage would introduce allocation during updates or reject existing supported content. These remain at current bounds. The GPU instance buffer can grow when a larger frame is first submitted; it then retains capacity, so growth may incur a transient driver cost. No driver allocation or heap-compaction policy was imposed.

Tall windows and validation

Surface dirty bits, bidi classes/bases and paragraph scratch now follow row count; resize no longer clamps to 64. Visible instance reservations scale with columns × rows, and GPU instance storage has no independent 69,632-quad ceiling. History cache entry count remains capped independently of Surface height.

Tests capture the last-row marker at 240×67 and 240×128. Both real desktops passed at 212×74, with client areas 1916×1414 (Win7) and 1924×1421 (Win10), after Windows constrained the requested 1928×1800 client area to the temporary display. The check verifies the reported grid exceeds 64 and that rendering/presentation completed; it does not compare a screenshot of the last row. Tall private bytes: 105,914,368 / 133,332,992. Live Rust requests: 63,752,673 / 63,822,450. The largest part is the two worst-case instance reservations, about 24.1 MB each; storage remains proportional to the visible grid, not a global maximum grid.

Workspace lint and tests pass, including the approved text goldens without edits. Release executable: 3,261,440 bytes, below 5,000,000. WARP validation results are recorded in the status document.

Noto sidecar census (2026-11-07)

Release x64 WARP, 80×24, three seconds settled, interactive Sal, both Noto sidecars present. The final system-preference policy keeps explicit fonts first, uses Segoe UI Emoji on Win10, and uses Noto Color ahead of monochrome symbols on Win7. The isolated helper uses the same GetProcessMemoryInfo PrivateUsage and app diagnostics as vm-memory, with its own guest folder/task to avoid concurrent acceptance probes overwriting w18 files. Reproduce after cargo xtask sidecar and the Windows release build:

export PATH=/nix/store/2g8sjq53xas3fplx76hvm2nrk2sslbrz-zig-0.17.0/bin:$PATH
python3 scripts/emoji-memory.py

The helper takes the shared VM lock around direct guest-agent calls. Do not wrap cargo xtask vm-* in an outer flock. It leaves the display mode unchanged and measures only idle and emoji; the regular vm-memory retains its tall-grid gate.

MeasurementWin7Win10
Idle private bytes28,372,992 (27.06 MiB)39,473,152 (37.64 MiB)
Idle budget30 MiB: pass40 MiB: pass
After emoji screen30,846,976 (29.42 MiB)40,480,768 (38.61 MiB)
Increase after emoji2,473,984 (2.36 MiB)1,007,616 (0.96 MiB)
Fresh-cache Noto CBDT raster at 16 px913 µs1,004 µs
Subsequent cached raster2 µs0 µs (timer resolution)

The 30/40 MiB limits are idle budgets. These runs also remain below those allowances after the emoji-filled screen. Font sources are mapped, not copied to the Rust heap; read-only mappings must not be added to PrivateUsage.

The latency probe constructs an independent Noto-only Engine, shapes the first visible emoji cluster (🇵, a regional indicator at the scrolled screen edge), and times only its fresh Swash bitmap raster and copy into caller scratch, then a cache hit. Both return nonempty 19×18 RGBA output from the 109-ppem CBDT strike. The nominal 16 px diagnostic size is separate from the candidate renderer's 15.36 px shape size in its normal 9×19 cell. These are single observations, not percentiles; discovery, mapping, shaping and presentation latency are excluded. Win10 normally uses Segoe for the screen; the diagnostic deliberately measures the Noto fallback's first-raster cost on both guests.

Artifacts: build/emoji-memory/{win7,win10}-desktop.log, matching *-memory-{idle,emoji}.txt, *-stats.bin.emoji.txt, and *-stats.bin.bmp. Both isolated reports end in RESULT PASS. The helper grants Sal access only to its own test directory. It freezes the input executable before acquiring the VM lock; VOYAGER7_MEASURE_EXE can select a previously built ordinary release artifact while another agent builds an experimental feature variant.

Noto and its two OFL files add 12,664,707 bytes (12.08 MiB) unpacked, or 11,139,006 bytes as a standalone level-9 ZIP. The complete fonts directory totals 13,384,000 bytes (12.76 MiB), or 11,438,016 ZIP bytes. These do not enter the executable. cargo xtask size reports 3,615,232 bytes, below 5,000,000; cargo xtask check-imports passes the Win7 gate. Font pins, differences from Ghostty, and render candidates are in emoji-sidecars.md.

Sequence coverage uses actual shaping, not a flag/font-name special case. The fresh HarfRust data, buffer and shape cost per attempted candidate is included; font mapping is excluded. For Lebanon/England, Win7 tried two faces and spent 332/239 µs total; Win10 tried 41 faces and spent 10,206/11,076 µs total. Segoe UI Emoji was rejected in 187/184 µs; Noto accepted the clusters in 170/173 µs on Win10. This is font-resolution work per unique screen grapheme, not a per-frame cost. build/emoji-memory/*-stats.bin.sequence.txt records every attempted face. The diagnostic probes use temporary allocations, so the measured post-emoji heap slack includes their effect as well as the renderer's retained storage.

The frozen ordinary release measured above is 3,616,256 bytes, SHA-256 5572c1f675faa7bbb762253f1428f2b976244965074f9ca45986e7f895c3c11d. It is retained at build/emoji-memory/voyager7.exe. This avoids mixing a concurrently built experimental feature variant into the two-guest census.