17typedef void* (*bj_malloc_fn)(
25typedef void* (*bj_realloc_fn)(
145BANJO_EXPORT
void* bj_memmove(
152BANJO_EXPORT
int bj_memcmp(
153 const void* p_block_a,
154 const void* p_block_b,
General-purpose definitions for Banjo API.
bj_free_fn fn_free
The deallocation function.
Definition memory.h:49
bj_realloc_fn fn_reallocation
The reallocation function.
Definition memory.h:48
void * p_user_data
General purpose context data.
Definition memory.h:46
bj_malloc_fn fn_allocation
The allocation function.
Definition memory.h:47
void * bj_calloc(size_t size)
Allocate size bytes of memory and returns a pointer to it.
void * bj_memcpy(void *p_dest, const void *p_src, size_t mem_size)
Copies mem_size bytes from the object pointed to by p_src to to object pointed to by p_dest.
void * bj_malloc(size_t size)
Allocate size bytes of memory and returns a pointer to it.
void bj_memset(void *p_dest, uint8_t value, size_t mem_size)
Copies the value value into each ot the first num bytes of the object pointed to by p_dest.
void bj_memory_unset_defaults(void)
Reset the default allocators.
void * bj_realloc(void *p_memory, size_t size)
Reallocate the given area of memory.
void(* bj_free_fn)(void *p_user_data, void *p_memory)
Memory allocation callback.
Definition memory.h:35
void *(* bj_malloc_fn)(void *p_user_data, size_t size)
Memory allocation callback.
Definition memory.h:17
void bj_memory_set_defaults(const bj_memory_callbacks *p_allocator)
Set the default allocators.
void *(* bj_realloc_fn)(void *p_user_data, void *p_original, size_t size)
Memory allocation callback.
Definition memory.h:25
void bj_memzero(void *p_dest, size_t mem_size)
Sets the mem_size bytes starting from p_dest to 0.
void bj_free(void *p_memory)
Deallocate the given area of memory.
Custom allocation callbacks.
Definition memory.h:45