Datasheet
The C and C++ Libraries
4-62 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
4.8.4 __Heap_Initialize()
Initializes the heap.
Syntax
void __Heap_Initialize(struct __Heap_Descriptor*h)
Implementation
This is called at initialization. You must redefine it toset up the fields in your heap
descriptor structure to correct initial values. A typical linked-list heap initializes the
first_free_block pointer to
NULL
to indicate that there are no free blocks in the heap.
4.8.5 __Heap_DescSize()
Returns the size of the
__Heap_Descriptor
structure.
Syntax
int __Heap_DescSize(int 0)
Implementation
This is called at initialization. It must return the sizeof your heap descriptor structure.
In almost all cases the implementation in Example 4-18 is sufficient.
Example 4-18 Heap_DescSize
extern int __Heap_DescSize(int zero) {return sizeof(__Heap_Descriptor);}
This routine is required so that the library initialization can find an initial piece of
memory big enough to be the heap descriptor.