Files
kitty/kitty/history.h
Sinity d96752e0f1 Allocate history buffer segments with mmap
glibc can raise its dynamic mmap threshold above these MB-scale allocations, routing later scrollback segments through brk. Closing windows then leaves the freed segments stranded in allocator bins and grows the long-lived kitty process.

Back the existing batched segment layout with anonymous mappings instead. This preserves zero-initialization and pointer layout while ensuring the memory is returned to the OS when a history buffer is cleared or destroyed.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-11 21:46:30 +02:00

1.2 KiB