#include <revolution/os.h> void* OSAlloc(u32 size);
| size | Size of object to allocate. |
|---|
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 from the current heap.
The memory allocation services must have first been initialized by the OSInitAlloc and OSCreateHeap functions; the heap is created by the OSCreateHeap function.
Memory Allocation Functions, OSInitAlloc, OSCreateHeap, OSAllocFromHeap, OSFree, OSSetCurrentHeap
2006/03/01 Initial version.
CONFIDENTIAL