This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: main() { double x[1048181]; int n = sizeof(x); }
- To: gcc-bugs at gcc dot gnu dot org, zvyagin at gams dot ihep dot su
- Subject: Re: main() { double x[1048181]; int n = sizeof(x); }
- From: Mike Stump <mrs at windriver dot com>
- Date: Wed, 5 Jan 2000 11:40:31 -0800 (PST)
> Date: Wed, 5 Jan 2000 22:10:07 +0300 (MSK)
> From: Alexander Zvyagin <zvyagin@gams.ihep.su>
> To: gcc-bugs@gcc.gnu.org
> to my great surprise this code
Not mine.
> main() { double x[1048181]; int n = sizeof(x); }
Your OS allocates so much for the stack, you are exceeding that
amount. You have two choices, use new, or tell your OS you will be
using more stack. ulimit -s 100000 in ksh/bash and limit stacksize
100000 in csh will usually do the trick.
This isn't a bug, but a FAQ.