Where does RL-RTX store function return addresses?

Hi Everyone.

I am a little confused about something.
Let's Suppose I'm running some concurrent tasks in RL-RTX. and let's say one of those tasks is calling a chain of functions ( a function that calls a function that calls another function).

I have 2 questions:
1. Where are the return addresses stored before jumping to the function instruction? Is it stored on the task's stack?

2. if it is stored on the task's stack, then is this (size of the return addresses) taken into account when the linker calculates "Maximum stack depth" and "Stack usage" stored in the html file in the output directory? or is that only the automatic variables?

Thank you very much in advance.

Parents
  • The answer to both questions is yes. However, the output if the compiler is only an estimate based on actual calls; it will not, as far as I know, indicate recursion which could have a much higher price in terms of stack usage. Another relation that cannot generally be resolved is the stack usage of function pointer. I am sure there are more - remember: it is only an estimate.

Reply
  • The answer to both questions is yes. However, the output if the compiler is only an estimate based on actual calls; it will not, as far as I know, indicate recursion which could have a much higher price in terms of stack usage. Another relation that cannot generally be resolved is the stack usage of function pointer. I am sure there are more - remember: it is only an estimate.

Children
More questions in this forum