Memory Allocation Support
2-14
Allocate Bulk Memory Block
mmBulkAlloc
Syntax
void *mmBulkAlloc( INT32 Size );
Return Value
Pointer to allocated memory or NULL on error
Description
Allocates a memory block of at least size bytes in length. The function returns
a pointer to the new memory block, or NULL if memory is not available. The
size of the allocation is not restricted.
Free Bulk Memory Block
mmBulkFree
Syntax
void mmBulkFree( void *pv );
Return Value
nothing
Description
Frees a previously allocated memory block by supplying the pointer that
mmBulkAlloc() originally returned.
Reallocate Bulk Memory Block
mmBulkRealloc
Syntax
void *mmBulkRealloc( void *pv, INT32 Size );
Return Value
Pointer to reallocated memory or NULL on error or when Size is zero
Description
Reallocate a previously allocated memory block by supplying the pointer that
mmBulkAlloc() originally returned. If Size is zero, the block is simply freed and
this function returns NULL. Otherwise, a NULL return indicates that the block
could not be reallocated and the original memory pointer (pv) is still valid. On
success, this function returns a pointer to the new memory block.
Copy Memory
mmCopy
Syntax
void mmCopy( void *pDst, void *pSrc, uint size );
Return Value
nothing
Description
Called to copy size bytes of data memory from the data buffer pSrc to the data
buffer pDst.
Zero Memory
mmZeroInit
Syntax
void mmZeroInit( void *pDst, uint size );
Return Value
nothing
Description
Called to initialize size bytes of data memory in the data buffer pDst to NULL.