This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: main() { double x[1048181]; int n = sizeof(x); }


> 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]