1.7.9 Using malloc() when exploiting the C library

If heap support is required for bare machine C, you must implement _init_alloc() and __rt_heap_extend().

_init_alloc() must be called first to supply initial heap bounds, and __rt_heap_extend() must be provided even if it only returns failure. Without __rt_heap_extend(), certain library functionality is included that causes problems when you are writing bare machine C.

Prototypes for both _init_alloc() and __rt_heap_extend() are in rt_heap.h.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.