MI_InitAllocator

Syntax

#include <nitro/mi.h>

void MI_InitAllocator(MIAllocator *allocator,
void *userdata,
MIAllocatorAllocFunction alloc,
MIAllocatorFreeFunction free);

Arguments

allocator Pointer to the MIAllocator structure to be initialized.
userdata Any user-defined value to be linked with the structure.
alloc Pointer to the callback function to be used for memory allocation.
free Pointer to the callback function to be used for memory deallocation.

Return Values

None.

Description

Specifies the callback to use for memory management and a freely configurable argument, and initializes the MIAllocator structure.

Calling MI_CallAlloc() or MI_CallFree() with this structure will cause the callback functions to be called directly.
For more information, see the reference for the MIAllocator structure.

See Also

MIAllocator, MIAllocatorAllocFunction, MIAllocatorFreeFunction
MI_CallAlloc, MI_CallFree

Revision History

2007/06/12 Initial version.


CONFIDENTIAL