Core public API for the Arena memory allocator.
size_t marker
Marker to rewind arena to this point.
t_arena_stack_frame * top
Top of the stack (most recent frame)
t_arena * arena
Arena associated with this stack.
struct s_arena_stack_frame * prev
Previous frame in the stack.
void arena_stack_push(t_arena_stack *stack)
Push the current arena state onto the stack.
void arena_stack_pop(t_arena_stack *stack)
Pop and restore the last saved state from the stack.
struct s_arena_stack_frame t_arena_stack_frame
Internal frame representing a single state snapshot in the stack.
struct s_arena_stack t_arena_stack
Stack structure for scoped arena memory control.
void arena_stack_init(t_arena_stack *stack, t_arena *arena)
Initialize an arena stack with a given arena.
void arena_stack_clear(t_arena_stack *stack)
Clear all stack frames without modifying arena state.
Stack structure for scoped arena memory control.
Internal frame representing a single state snapshot in the stack.
The main memory arena structure used for fast allocation.