OSCreateHeap

C Specification

#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 heap handle to use with the OSAllocFromHeap and OSFreeToHeap functions. If not successful, returns -1.

Description

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

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

Memory allocation processing must be initialized by the OSInitAlloc function first.

See Also

Memory Allocation Functions, OSInitAlloc,OSAllocFromHeap, OSDestroyHeap, OSFreeToHeap

Revision History

03/01/2006 Initial version.