Skip to content

ADR-0011 — The saver leaves allocator settings alone

  • Status: Accepted
  • Date: 2026-11-12
  • Supersedes: none
  • Authors: project maintainers

Context

The patch prototype held many large base values in memory, and its RSS grew far beyond the bytes its cache accounted for: 1,158 MB with a 16 MB cache bound over 50 threads (measured before public release). glibc may keep freed buffers in the process; lowering MALLOC_MMAP_THRESHOLD_ changes that, but it is a process-wide setting.

Decision

The saver will never change process-wide malloc settings. The documentation names MALLOC_MMAP_THRESHOLD_ for operators who need it, and the memory bar (ADR-0005) is judged without it.

Alternatives considered

  • Set the threshold from the saver — rejected: a library must not change how the whole host process allocates.

Consequences

  • The memory bar measures what an application gets by default.
  • An operator with a memory problem has a documented setting to try.

References