1#ifndef KEEL_ALLOCATOR_H
2#define KEEL_ALLOCATOR_H
13 void *(*malloc)(
void *ctx,
size_t size);
14 void *(*realloc)(
void *ctx,
void *ptr,
size_t old_size,
size_t new_size);
15 void (*free)(
void *ctx,
void *ptr,
size_t size);
void * kl_realloc(KlAllocator *a, void *ptr, size_t old_size, size_t new_size)
Reallocate memory through the given allocator.
void kl_free(KlAllocator *a, void *ptr, size_t size)
Free memory through the given allocator.
void * kl_malloc(KlAllocator *a, size_t size)
Allocate memory through the given allocator.
KlAllocator kl_allocator_default(void)
Return the default stdlib-backed allocator.
Bring-your-own allocator vtable.
Definition allocator.h:12
void * ctx
Definition allocator.h:16