Re:Untangling Lifetimes: The Arena Allocator
by SleepyMyroslav on Monday October 31, 2022 @07:25AM
(#33404313)
For me as non native speaker it is interesting choice of words with 'Untangling'. While arenas achieve the goal to simplify lifetime management by reducing number of different lifetimes they do it by effectively 'entangling' lifetimes. If arenas are reused they make UAF detection a problem that needs special care. Performance is usually great so it is used everywhere not only in gamedev.
[ Parent
| on HN ]
Re:Untangling Lifetimes: The Arena Allocator
by vitiral on Monday October 31, 2022 @09:03AM
(#33405153)
They are untangled from each other.
UAF would be the same difficulty as allocated arrays I would think?
Re:Untangling Lifetimes: The Arena Allocator
by rfleury on Monday October 31, 2022 @03:54PM
(#33411914)
A fair point on the title! I think you can see it from both perspectives. When I chose the title, I was thinking of "untangling" in this sense: In the traditional C program that overuses malloc/free, you end up in a forest of dynamic lifetimes all "tangled together". So, arenas are useful in "untangling those", in the same way that you might untangle cables for your PC by bundling them together.