172 arena->hooks.hook_cb = cb;
173 arena->hooks.context = context;
Core public API for the Arena memory allocator.
void(* arena_allocation_hook)(t_arena *arena, int alloc_id, void *ptr, size_t size, size_t offset, size_t wasted, const char *label)
Allocation hook callback type.
#define ARENA_UNLOCK(arena)
#define ARENA_LOCK(arena)
Acquire the mutex lock if thread safety is enabled.
void arena_set_allocation_hook(t_arena *arena, arena_allocation_hook cb, void *context)
Set or remove an allocation hook on a given arena.
void arena_report_error(t_arena *arena, const char *fmt,...)
Report an error from an arena using its configured error callback.
The main memory arena structure used for fast allocation.