Complexity of ArenaAllocator
ziggit.dev·1d
🏟️Arena Allocators
Preview
Report Post

January 20, 2026, 8:36am 1

In my current project I have an AST-Tree based on a text document. My current setup involves creating the AST and then recursively walking the Tree to clean up memory usage.

I thought of using an ArenaAllocator instead that holds all allocations relating to the document and it can be freed.

I wanted to ask if allocation or deallocation is slower with an ArenaAllocator. Or does it have any other implications for memory segmentation?

If nothing major speaks against it it sounds like the better way of dealing with this.

vulpesx January 20, 2026, 8:49am 2

if the arena doesn’t have memory available, it has to ask the sub allocator for more. So initial allocations will be slightly, but probably immeasurably, slower. But if t…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help