OSCreateHeap

Syntax

#include <revolution/os.h>

OSHeapHandle OSCreateHeap(void* start, void* end);

Arguments

start Heap starting address.
end Heap ending address.

Return Values

If successful, returns a new handle to the heap for use by the OSAllocFromHeap and OSFreeToHeap functions. If not, returns -1.

Description

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

Reserves a memory region from start to end to use as a heap. Initializes heap descriptor and free list.
Consumes one entry in the heap array.

The memory allocation services must be initialized by the OSInitAlloc function.

See Also

Memory Allocation Functions, OSInitAlloc, OSAllocFromHeap, OSDestroyHeap, OSFreeToHeap

Revision History

2006/03/01 Initial version.


CONFIDENTIAL