Untangling Lifetimes: The Arena Allocator

16 signa11 3 6/28/2025, 8:45:05 AM rfleury.com ↗

Comments (3)

ykonstant · 1h ago
The author's defense of C reminds me of this classic youtube video: https://www.youtube.com/watch?v=443UNeGrFoM&pp=ygUPaG93IGkgc...

I am sure the video above will cause immediate disagreement (I think it goes too far on some topics), but I urge people to consider the ideas contained within.

(I seem to have mis-posted this to another thread?)

gorjusborg · 1h ago
It seems like the choice of a stacklike Arena API makes the examples a little more confusing than needed. An arena doesn't necessarily mean allocation 2 must be freed before allocation 1.

If this seems cool to you, check out Zig. The libraries use a similar convention where code that might allocate requires passing an allocator, which may be an arena, or something cool we don't even know about yet.

williamcotton · 2h ago
Another use case is a per-request arena for a web server.