Zen API
|
kStatus kApiLib_SetMemAllocHandlers | ( | kApiMemAllocFx | allocFx, |
kApiMemFreeFx | freeFx, | ||
kPointer | provider | ||
) |
Sets handler functions for memory alloc/free operations.
By default, kApiLib uses C standard library functions for memory allocation. Call this function to override the default behaviour.
This function is not thread-safe and should be called before calling kApiLib_Construct.
allocFx | Memory allocation callback function. |
freeFx | Memory deallocation callback function. |
provider | Context pointer (provided to callback functions). |