Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

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.

Parameters

  allocFx | Memory allocation callback function.
  freeFx | Memory deallocation callback function.
  provider | Context pointer (provided to callback functions).

Returns
  Operation status.