#include <revolution/os.h> void* OSAllocFromHeap(OSHeapHandle heap, u32 size);
heap |
Handle to a heap that was returned from the OSCreateHeap function |
|---|---|
| size | Size of object to be allocated. |
Returns a null pointer if allocation is unsuccessful. Otherwise, returns a pointer to the allocated region, aligned to a 32-byte boundary.
Although this function is provided for the sake of compatibility, we recommend using the MEM library.
Allocates size bytes of memory from heap. Supplementary regions will be consumed from this heap. This overwrites the heap selected by the OSSetCurrentHeap function for this allocation.
The memory allocation services must be initialized by the OSInitAlloc function.
Memory Allocation Functions, OSInitAlloc, OSCreateHeap, OSFreeToHeap
2006/03/01 Initial version.
CONFIDENTIAL