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

Allocate at initialization and reconfiguration only

Status: accepted. Date: 2026-11-05.

TigerBeetle's TigerStyle allocates all memory statically at startup. A terminal cannot know its scrollback, font set, or image load at startup, but it can bound them. We adopted the adapted rule: memory is allocated at initialization and at explicit reconfiguration (resize, font or size change, config reload), never in the per-byte path of the Backend, the per-frame path of the Renderer, or the per-event path of input. Every buffer has a cap, from config or a compile-time constant: columns, rows, scrollback bytes, number of fonts, fallback chain length, VT bytes consumed per tick, glyph atlas size, image memory. Per-frame scratch comes from one arena that is reset each frame. libghostty-vt already follows this model with its page memory limit.

Consequences

  • Steady-state allocation count is a measured gate: zero allocations per frame and per input batch once the Surface is running. The test suite counts them through the global allocator.
  • Caps are visible in the config file with their defaults, so a user can trade memory for scrollback knowingly.
  • Resize and font changes are allowed to be slower; they are where allocation lives.