>Date: Tue, 09 Nov 1999 15:32:47 +0100
>From: Marc Wiegmann <[EMAIL PROTECTED]>
>Subject: Re: [rtl] definition of varables in functions
>
>Thanks to all!
>Ok, the local variables are on stack and this one is allocated on init
>time.
In fact, variables on the stack are allocated only when the function
is called. That's when the stack pointer is subtracted to make room
for all the variables inside the function (parameters and local variables).
Naturally, the stack pointer is added by the same amount to free the
variables when the function returns.
>I have tried to define an array with 10 MByte in a module -> the
>system is crashed -> OK. The same array as userlevel-task -> works fine.
>I think the compiler will determine the size of stack, is it correct?
>Is it only for non kernel applications?
Yes. For RT-tasks you have to define the size of the stack by hand.
>How big is the stack for kernel tasks. Can I determine the size?
In theory, as big as you need. For your 10MB array, you'll need at
least a 10MB stack (+ for any other local variable or parameter).
I don't think it's possible though such a huge stack. (is it?)
Guilherme
-------------< G. N. DeSouza >-------------
---------< [EMAIL PROTECTED]>---------
--< http://rvl1.ecn.purdue.edu/~gnelson >--
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/