#include <dwc.h>
typedef void* (*DWCAllocEx)( DWCAllocType name, u32 size, int align );
typedef void (*DWCFreeEx )( DWCAllocType name, void* ptr, u32 size );
void DWC_SetMemFunc( DWCAllocEx alloc, DWCFreeEx free );
Sets the functions for allocating and deallocating memory to be used by the entire DWC library.
DWCAllocEx function for allocating memory.
The memory allocation function returns the pointer to a buffer of size bytes that has align-byte alignment. If memory allocation fails, it returns NULL.
Ignore name as it contains information for DWC library development.
DWCFreeEx function for releasing memory.
The memory release function releases buffers allocated using the memory allocation function specified by ptr.
Ignore name: it contains information for DWC library development.
Ignore size: it stores information for DWC library development and does not contain an accurate value.
alloc |
Pointer to the DWCAllocEx function used to allocate memory. |
free |
Pointer to the DWCFreeEx function used to free memory. |
None.
2007/10/09 Added a description for the cases where memory cannot be allocated.
2005/12/16 Revisions.
2005/10/26 Revisions.
2005/07/22 Initial version.
CONFIDENTIAL