IT lexicon › Programming › Arena allocator

Arena allocator

Programming På svenska → Updated: 2026-07-30

The allocation strategy where you take one large block of memory, hand out pieces of it by moving a pointer forward, and then free the lot in a single stroke. Individual frees do not exist.

An allocation thus becomes about three instructions instead of a call into a general-purpose memory manager with its free lists and its lock, and as a bonus objects created in sequence also end up physically in sequence, which the cache likes. The pattern suits workloads with a clear lifetime: a compiler can allocate its entire syntax tree in an arena and drop it when the phase is done, a web server can give each request its own and reset it on response. What does not suit it is objects with differing lifetimes, since memory is never reused until the whole arena is released — one long-lived object therefore keeps everything else alive. Destructors also have to be handled separately, and in typed languages every object in the arena is tied to the same lifetime, which shows up in the signatures.

← Back to the lexicon