Code- and heap- size
eric.norum at usask.ca
Thu Oct 4 17:48:06 UTC 2001
Jan.Suchotzki at de.abb.com wrote:
> while I´m now able to get all the information about used resources
> (thanks again for the answers), I have a new porblem.
> I was wondering where RTEMS allocates the memory for normal
> variables, arrays etc. A short example that I´ve written for this
Local variables go on the task stack. They take up space only
when the function is active.
It is up to you to make sure
that the stack for each task is big enough to hold all local variables.
Be especially careful with recursive functions and functions with
large local variables.
The need to predetermine stack usage is a requirement of pretty much
every multi-threaded system, including RTEMS, vxWorks, pSOS+ (and
even linux/solaris when using multi-threaded applications).
Eric Norum eric.norum at usask.ca
Department of Electrical Engineering Phone: (306) 966-5394
University of Saskatchewan FAX: (306) 966-5407
More information about the users