Hacker News new | past | comments | ask | show | jobs | submit login

Arena allocators add the ability to free all allocations in an entire arena with a single call. That means that you don’t have to keep track of allocations made. That can simplify APIs that take and/or produce pointers.

They also allow you to have multiple arenas.

A use case is a web server, where each request creates an arena, allocates scratch memory in it, and destroys the arena after handling the request.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: