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