Function in stdx_arena.h

x_arena_reset

Reset the arena: keep all chunks, set used = 0.

X_ARENA_API void x_arena_reset(XArena *arena);

Parameters

XArena *arena
The arena to reset.
Function in stdx_arena.h

x_arena_reset_keep_head

Keep only the head chunk, free the rest.

X_ARENA_API void x_arena_reset_keep_head(XArena *arena);

Parameters

XArena *arena
The arena to reset.
Function in stdx_arena.h

x_arena_trim

Keep the first `keep_n` chunks, free the rest.

X_ARENA_API void x_arena_trim(
 XArena *arena,
 size_t keep_n
);

Parameters

XArena *arena
The arena to trim.
size_t keep_n
The number of chuncks to preserve.