#include <nitro/mi.h>
typedef void* (*MIAllocatorAllocFunction)(void *userdata, u32 length, u32 alignment);
userdata | An arbitrary user-defined value specified with MI_InitAllocator() .This is provided for the sake of convenience in implementing callback functions. |
length | Memory size to be allocated. |
alignment | Boundary alignment required for memory addresses. |
Must return the memory actually allocated if successful; otherwise NULL.
This function prototype represents the format of callback functions used to allocate memory from the allocator.
Use this format to implement a memory allocation operation and to specify your implementation in MI_InitAllocator()
.
MIAllocator, MIAllocatorFreeFunction
MI_InitAllocator, MI_CallAlloc, MI_CallFree
2007/06/12 Initial version.
CONFIDENTIAL