ARM VERSION 1.2 Arkusz Danych Strona 152

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 276
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 151
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.
Przeglądanie stron 151
1 2 ... 147 148 149 150 151 152 153 154 155 156 157 ... 275 276

Komentarze do niniejszej Instrukcji

Brak uwag