Datasheet

The C and C++ Libraries
4-60 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
4.8.2 Creating your own storage-management system
You can implement the heap functions in Table 4-11 to create a new
storage-management system.
Table 4-11 Heap functions
Function Description
__Heap_Descriptor
You must define your own implementation of the
abstract data type for heap. See __Heap_Descriptor on
page 4-61.
__Heap_Initialize()
Initializes the heap. See __Heap_Initialize() on
page 4-62.
__Heap_DescSize()
Returns the size of the
__Heap_Descriptor
structure. See
__Heap_DescSize() on page 4-62.
__Heap_ProvideMemory()
Called to increase the size of the heap. See
__Heap_ProvideMemory() on page 4-63.
__Heap_Alloc()
Allocates memory from the heap to the application. See
__Heap_Alloc() on page 4-63.
__Heap_Free()
Returns previously allocated space to the heap. See
__Heap_Free() on page 4-64.
__Heap_Realloc()
Adjusts the size of an already allocated block. See
__Heap_Realloc() on page 4-64.
__Heap_Stats()
Called from
__heapstats()
to print statistics about the
state of the heap. See __Heap_Stats() on page 4-65.
__Heap_Valid()
Called to perform a consistency check on the heap. See
__Heap_Valid() on page 4-65.
__Heap_Full()
Attempts to acquire a new block from the system. You
must not re-implement this function. See __Heap_Full()
on page 4-66.
__Heap_Broken()
Called when an inconsistency in the heap is detected.
See __Heap_Broken() on page 4-66.