Untangling Lifetimes: The Arena Allocator
Summary
The article argues that arena allocators can simplify memory lifetimes in C by moving away from malloc/free, addressing common pitfalls like leaks and fragmentation. It introduces stack-based intuition, frame/scratch/pool arenas, and composition with other allocators, along with practical implementation notes and real-world use cases. The piece emphasizes performance, reliability, and maintainable memory management without sacrificing low-level control.