| |||
| Home > The C and C++ Libraries > Tailoring storage management | |||
This section describes the functions from rt_heap.h that
you can define if you are tailoring memory management. There are
also two helper functions that you can call from your heap implementation.
See the rt_heap.h and rt_memory.s include
files for more information on memory-related functions.
If you are developing embedded systems with limited RAM you might require a system that does not use the heap or any heap-using functions. Otherwise, you might require your own heap functions. There are two library functions that you can include to cause a warning message if the heap is used:
__use_no_heap()Guards against use of malloc(), realloc(), free(),
and any function that uses them (such as calloc() and stdio).
This only guards against the use of these functions from the libraries
supplied by ARM Limited, not your own libraries.
__use_no_heap_region()Has the same properties as __use_no_heap(),
but also guards against other things that use the heap memory region.
For example, if you declare main() as a function
taking arguments, the heap region is used for collecting argc and argv.
This section describes: