#include <nitro/os.h>
void* OS_AllocFixed( OSArenaId id, void** rstart, void** rend );
id | Arena ID of the arena associated with the region that will be allocated. |
rstart | Pointer to a block start address. |
rend | Pointer to a block end address. |
If the specified block has been allocated, the 32-byte aligned start address is returned.
If rstart
and rend
are larger than the region requested, they will be revised to the region's actual start and end address.
Allocates the specified region.
The arena is specified with the arena ID (id). To read more about this value, see OS_InitArena
. Areas overlapping memory blocks of other heaps in the arena will be erased from the heap. This can cause non-contiguous, fragmented heaps. Using OS_AddToHeap
could also cause this phenomenon. No check is made for any overlap of other fixed blocks. A 0-sized (zero-length) heap could also be generated.
The OS_AllocFixed
function must be called before any other call related to OS_Alloc*()
.
OS_InitArena, OS_AddToHeap, OS_AllocFromHeap
2004/01/06 Initial version.
CONFIDENTIAL