59 size_t wasted,
const char* label);
size_t size
Total size of the buffer.
size_t offset
Current used offset (bump pointer).
struct s_arena_hooks t_arena_hooks
Internal structure for managing arena hooks.
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.
void arena_set_allocation_hook(t_arena *arena, arena_allocation_hook cb, void *context)
Set or remove an allocation hook on a given arena.
The main memory arena structure used for fast allocation.
Internal structure for managing arena hooks.
_Atomic(arena_allocation_hook) hook_cb
The active allocation hook callback.
void * context
Optional user data passed to the hook.