4.31 __rt_stackheap_init()

Defined in rt_misc.h, the __rt_stackheap_init() function sets up the stack pointer and returns a region of memory for use as the initial heap.

It is called from the library initialization code.

On return from this function, SP must point to the top of the stack region, r0 must point to the base of the heap region, and r1 must point to the limit of the heap region.

A user-defined memory model (that is, __rt_stackheap_init() and __rt_heap_extend()) is allocated 16 bytes of storage from the __user_perproc_libspace area if wanted. It accesses this storage by calling __rt_stackheap_storage() to return a pointer to its 16-byte region.

This function is not part of the C library standard, but the ARM® C library supports it as an extension.

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