|
infix
A JIT-Powered FFI Library for C
|
Internal definition of a memory arena. More...
#include <infix_internals.h>
Public Attributes | |
| char * | buffer |
| size_t | capacity |
| size_t | current_offset |
| bool | error |
| struct infix_arena_t * | next_block |
| size_t | block_size |
Internal definition of a memory arena.
An arena is a fast, region-based allocator. It pre-allocates a single block of memory and serves subsequent small allocation requests by simply "bumping" a pointer. All memory allocated from an arena is freed at once by destroying the arena itself, eliminating the need to track individual allocations.
| size_t infix_arena_t::block_size |
The size of this specific block's buffer, for chained arenas.
| char* infix_arena_t::buffer |
The backing memory buffer for the arena.
| size_t infix_arena_t::capacity |
The total size of the buffer.
| size_t infix_arena_t::current_offset |
The current high-water mark of allocation.
| bool infix_arena_t::error |
A flag set if any allocation fails, preventing subsequent allocations.
| struct infix_arena_t* infix_arena_t::next_block |
A pointer to the next block in the chain, if this one is full.