OSInitAlloc

C Specification

#include <revolution/os.h>
void* OSInitAlloc (void* arenaStart, void* arenaEnd, int maxHeaps);

Arguments

arenaStart Arena start address.
arenaEnd Arena end address.
maxHeaps Maximum number of active heaps that will be used in the program lifetime.

Return Values

Real arena start address aligned to a 32-byte boundary after the heap array has been allocated.

Description

Although this function is provided for compatibility's sake, we recommend using the MEM library.

Initializes memory allocation services and the arena in which all heaps will reside. This routine must be called before creating a heap.

At the beginning of the arena, a small region of memory is reserved for a heap descriptor array. The base address of the new arena is returned.

See Also

Memory Allocation Functions, OSCreateHeap, OSDestroyHeap

Revision History

03/01/2006 Initial version.