About stack

Guillaume Poletto poletto@jeuxvideo.com
Wed Mar 8 14:54:00 GMT 2006


I'd like to know what happens when using big local variables
ex :
void func () {
 char mybuff[50000];
 /* .. */

To avoid problems, i have been used to put instinctivly big local 
variables as 'static' in order to use data segment instead of stack. But 
now i'd like to save memory on data segment and reconsider using stack.

Is the stack limited? Is it configurable? Does some dynamic allocation 
occurs (allocating more stack space)?

I use gcc on PC.

More information about the Gcc-help mailing list