Datasheet

The C and C++ Libraries
4-64 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
4.8.8 __Heap_Free()
Returns previously allocated space to the heap.
Syntax
void __Heap_Free(struct __Heap_Descriptor* h, void* _blk)
Implementation
This is called from
free()
,and given a pointer that was previously returned from either
__Heap_Alloc()
or
__Heap_Realloc()
. It returns the previously allocated space to the
collection of free blocks in the heap.
4.8.9 __Heap_Realloc()
Adjusts the size of an already allocated block.
Syntax
void __Heap_Realloc(struct __Heap_Descriptor* h, void* _blk, size_t size)
Implementation
This is called from
realloc()
.It is never passed trivial cases such as
blk
equal to
NULL
or
size
equal to zero. It adjusts the size of the allocated block blk to become
size
. The
reallocation might involve moving the block, copying as much of the data as is common
to the old and new sizes, and returning the new address. The default implementation of
this function maintains 8-byte alignment of heap block. If you reimplement this
function it is recommended that you maintain 8-byte alignment.