Open and answer this issue on GitHub.
runtime, performance, decision · opened 2026-11-20 · updated 2026-11-20 · 0 comments
Found while a Counting global allocator in the nikaia binary costs +4.2 % instructions (#2368) Related: Choosing the allocator: a build, a task or a call names where memory comes from, and an allocation that may fail returns a value (#1493); ADR-327 D4-D11: memory budgets per task and per shared value (#490)
Rethink how Nikaia programs get, reuse and give back memory, beyond allocating less (the issue on the compiler allocating less). About 31 % of a compile’s instructions are glibc’s malloc/free; a task’s block (ADR-327) already bump-allocates inside a segment, and everything outside it goes to the system allocator.
malloc_consolidate (67 M Ir in the compile above) points at fragmentation.A decision paper (options with measured figures, a recommendation) is attached here and the chosen steps are filed as issues.