3 ms·
See also the "arena allocator", which has been discussed here before: https://nullprogram.com/blog/2023/09/27/ https://nullprogram.com/blog/2023/09/27/ I haven
by afarah1 2y ago
See also the "arena allocator", which has been discussed here before: https://nullprogram.com/blog/2023/09/27/ https://nullprogram.com/blog/2023/09/27/
I haven't used it personally yet, but it addresses the same issue with a different approach, also related to stack-like lifetimes.
I've used simple reference counting before, also somewhat relevant in this context, and which skeeto also has a nice post about: https://nullprogram.com/blog/2015/02/17/ https://nullprogram.com/blog/2015/02/17/