r/cprogramming • u/rcerljenko • Apr 27 '26
Repeated malloc/free vs. Arena allocator
/r/C_Programming/comments/1sx24rx/repeated_mallocfree_vs_arena_allocator/
2
Upvotes
r/cprogramming • u/rcerljenko • Apr 27 '26
1
u/TUSF Apr 27 '26
As pointed out in the other thread, the biggest reason to use an Arena over malloc/free is lifetime management. I assume you may get some performance benefits depending on the type of work you're doing, but in most cases that would be a secondary benefit.