4.9.8. __rt_stackheap_init()

This function is responsible for setting up sp and sl to point at a valid stack, and must also return in r0 and r1 the lower and upper bounds of a chunk of memory that can be used as a heap. (It can decline to do the latter, by returning r0 equal to r1. In this case, the first call to malloc() results in a call to __rt_heap_extend(), described in __rt_heap_extend().) An incomplete prototype implementation is in rt_memory.s. Because it is the first function called from entry, it does not have to preserve any other registers. On entry to this function, sp and sl are exactly as they were on entry to the whole application, so a valid stack can be inherited from the execution environment if desired. (sl is only required if stack checking is used.)

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D