Problem
Every heap allocation in native Home binaries is its own page-rounded mmap, and munmap never appears in native codegen. A long-running server's RSS grows without bound, at ≥4 KiB per small object. The HEAP_START/HEAP_SIZE constants still describe an old 1 MiB bump allocator and are unused.
Evidence (origin/main @ d4b219507)
packages/codegen/src/native_codegen.zig:86-96packages/codegen/src/native_codegen.zig:541packages/codegen/src/native_codegen.zig:5596-5630
Scope
- Ship a size-class allocator in the native runtime (or link a proven one).
- Emit frees at ownership drop points.
- Delete the dead bump-allocator constants.
Acceptance criteria
- Allocating and dropping 10M small objects in a loop stays under a fixed RSS ceiling.
- Allocation throughput benchmarked against the current mmap-per-object path.
Links
Part of #814.