Mail Archives: djgpp/1997/07/22/11:24:19
> It seems that when the integer x is forceably set (i.e.,
> statically allocated)
Not quite. Variables are only statically allocated if the are
declared globally or with the static keyword. You are doing neither,
which means it will be automatically allocated from the stack.
> int main(void) {
>
> #ifdef STRANGE
> int a, x[SIZE];
> #endif
> Stack Fault at eip=00001571
So it stack faults. DJGPP uses a fixed size stack. You are overrunning
it. You can use stubedit on your executable to increase the stack size
or just use the malloc method.
--
_______ ___________________________________________________________
/ Andrew Crabtree
/ Workgroup Networks Division
____ ___ / Hewlett-Packard
/ / / / Roseville, CA
__/ __/ _____/ 916/785-1675
/ andrewc AT rosemail DOT rose DOT hp DOT com
___________ __/ _____________________________________________________
- Raw text -