#include <revolution/mem.h> MEMHeapHandle MEMCreateExpHeapEx( void* startAddress, u32 size, u16 optFlag );
startAddress |
Start address of the allocated memory region in the heap. |
size |
Size (in bytes) of the memory region allocated to the heap. |
optFlag |
Heap options (explained below). |
Returns the heap handle when a heap can be created. Returns MEM_HEAP_INVALID_HANDLE (a NULL value) if a heap can't be created.
Creates the expanded heap. The heap region is a memory region that has a size specified by size beginning from the address specified by startAddress.
Heap options can be specified with optFlag.
MEM_HEAP_OPT_0_CLEAR |
The allocated memory block is filled with zeroes upon allocation from the heap. |
MEM_HEAP_OPT_DEBUG_FILL |
Upon heap creation or whenever memory blocks are allocated or freed, each is filled with different 32-bit values in the memory region. This flag is used for debugging to find memory access bugs caused by either a failure to initialize memory or invalid memory regions. This option is not valid for the FINALROM version of the library. |
MEM_HEAP_OPT_THREAD_SAFE |
Enables exclusive processing between threads. |
03/01/2006 Initial version.