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

__Heap_DescriptorYou must define your own implementation of the abstract data type for heap. See __Heap_Descriptor.
__Heap_Initialize()Initializes the heap. See __Heap_Initialize().
__Heap_DescSize()Returns the size of the __Heap_Descriptor structure. See __Heap_DescSize().
__Heap_ProvideMemory()Called to increase the size of the heap. See __Heap_ProvideMemory().
__Heap_Alloc()Allocates memory from the heap to the application. See __Heap_Alloc().
__Heap_Free()Returns previously allocated space to the heap. See __Heap_Free().
__Heap_Realloc()Adjusts the size of an already allocated block. See __Heap_Realloc().
__Heap_Stats()Called from __heapstats() to print statistics about the state of the heap. See __Heap_Stats().
__Heap_Valid()Called to perform a consistency check on the heap. See __Heap_Valid().
__Heap_Full()Attempts to acquire a new block from the system. You must not re-implement this function. See __Heap_Full().
__Heap_Broken()Called when an inconsistency in the heap is detected. See __Heap_Broken().
Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D