On 07/13/2011 03:13 PM, Jakub Nowacki wrote:
> As I understand it is related 
> to the amounts of memory being used by a task, which is put on the stack 
> during task switching, am I right?

Not really. When a function starts, it reserves some room on stack,
mainly for local variables that can not be put in registers (because not
enough registers are available, or for other reasons, such as the fact
that the address of the variable needs to be passed to another function).

When this function calls another function, this other function reserves
room on top of the first stack reserved room, hence the name "stack".

The worst case is the highest level, it may be due to too many functions
reserving little space on stack, or to one function reserving too much
room on stack. For most functions, you can easily measure how much they
reserve on stack by looking at their disassembly. I guess there are perl
scripts around to edit a report of the stack usage of each function in a
binary.

-- 
                                                                Gilles.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to