Skip to content

cf_arena_alloc

Category: allocator
GitHub: cute_alloc.h


Allocates a block of memory aligned along a byte boundary.

void* cf_arena_alloc(CF_Arena* arena, int size);
Parameters Description
arena The arena to allocate from.
size The size of the allocation, it cannot be larger than block_size from cf_arena_init.

Return Value

Returns an aligned pointer of size bytes.

cf_arena_init
cf_arena_free
cf_arena_reset