MEMCreateUnitHeap

Syntax

#include <revolution/mem.h>

MEMHeapHandle MEMCreateUnitHeap(
                             void*  startAddress,
                             u32    heapSize,
                             u32    memBlockSize );

Arguments

startAddress Start address of the memory region to allocate to the heap
heapSize Size in bytes of the memory region allocated to the heap
memBlockSize Size of the memory block in bytes

Return Values

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.

Description

Creates the unit heap. The heap region is a memory region with size heapSize and a start address specified by startAddress.

Each memory block has a fixed size specified by memBlockSize. The memory block alignment is 4.

See Also

MEMCreateUnitHeapEx

Revision History

2006/03/01 Initial version.


CONFIDENTIAL