#include <cafe/mem.h> MEMHeapHandle MEMCreateUnitHeapEx( void* startAddress, u32 heapSize, u32 memBlockSize, int alignment, u16 optFlag );
|startAddress||Starting address of the memory region allocated to the heap.|
|heapSize||Size (in bytes) of the memory region allocated to the heap.|
|memBlockSize||Size (in bytes) of the memory block.|
|alignment||Memory block alignment. Can take any of the following values:
|optFlag||Heap options (see details below).|
Returns the heap handle when a heap was successfully created. Returns
MEM_HEAP_INVALID_HANDLE (a null value) if a heap could not be created.
Creates the unit heap. The heap region is a memory region with a size specified by heapSize and a start address specified by startAddress.
Each memory block has a fixed size specified by memBlockSize. Each memory block has an alignment specified by alignment
32 as possible values.
Heap options can be specified with optFlag.
||The allocated memory block is filled with zeroes upon allocation from the heap.|
||Upon heap creation or whenever memory blocks are allocated or deallocated, 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
||Enables exclusive processing between threads.|
|Multiple threads||This function is not thread-safe.|
|Callbacks||Do not call this function from any callback function.|
2013/05/08 Automated cleanup pass.
2010/11/01 Initial version.