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,
is allocated 16 bytes of storage from the
if wanted. It accesses this storage by calling
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.