Skip to content

cf_allocator_override

Category: allocator
GitHub: cute_alloc.h


Overrides the default allocator with a custom one.

void cf_allocator_override(CF_Allocator allocator);

Remarks

The default allocator simply calls malloc/free and friends. You may override this behavior by passing a CF_Allocator to this function. This lets you hook up your own custom allocator. Usually you only want to do this on certain platforms for performance optimizations, but is not a necessary thing to do for many games.

CF_Allocator
cf_realloc
cf_allocator_restore_default
cf_alloc
cf_free
cf_calloc