|Non-Confidential||PDF version||ARM DUI0475M|
|Home > The ARM C and C++ Libraries > Stack and heap memory allocation and the ARM C and C++ libraries > Legacy support for __user_initial_stackheap()|
Defined in rt_misc.h,
__user_initial_stackheap() is supported for backwards compatibility with earlier versions of the ARM C and C++ libraries.
ARM recommends that you use
The differences between
the stack pointer (containing the same value it had on entry to
r1, and is expected to return the new stack
__user_setup_stackheap() receives the
stack pointer in
sp, and returns the stack base
provided with a small temporary stack to run on. This temporary
be implemented in C, providing that it uses no more than 88 bytes
of stack space.
__user_setup_stackheap() has no temporary
stack and cannot usually be implemented in C.
__user_initial_stackheap() reduces code
no requirement for a temporary stack.
In the following circumstances you cannot use the provided
__user_setup_stackheap() function, but
you can use the
Your implementation is sufficiently complex that it warrants the use of a temporary stack when setting up the initial heap and stack.
You have a requirement to implement the heap and stack creation code in C rather than in assembly language.