| |||
| Home > The C and C++ Libraries > Tailoring storage management > __Heap_Full() | |||
Attempts to acquire a new block of at least size bytes
from the system. You must not re-implement this function.
If __Heap_Alloc() or __Heap_Realloc() cannot
allocate a block of the required size from the memory owned by the
heap, then before giving up and returning NULL,
they can try calling this routine.
You must provide space for heap housekeeping data. If the
user asks for 1000 bytes and you store a word before every allocated
block, you must ask __Heap_Full() for 1004 bytes,
not 1000.
Before calling __Heap_Full(), you must
ensure that the heap data structures are in a consistent state so
that __Heap_ProvideMemory() calls can add the
new block to the heap successfully.