Arena Allocators in C
- Memory Allocation
- Describes the process in which working memory is reserved to be used by the program for use in computation.
- Freeing Memory
- The process by which memory previously allocated is made available to other programs (normally via the mediation of the operating system).
- Manual Memory Management
- Term used to describe how a programmer needs to write memory allocation and deallocation routines alongside the business logic of her code.
-
malloc()
- Part of the C standard, allocates an amount of memory. Blocks of memory allocated in this way needs to be free()'d later
-
free()
- Frees the memory associated with a given pointer.
- Arena Allocator
- An memory allocator and allocation scheme where memory is allocated from a central, possibly growing pool of available memory. Allocations made with this technique do not need to be individually free()'d as all of the items allocated by a given arena allocator instance will be freed when the allocator itself is freed