This is the mail archive of the
mailing list for the GCC project.
Re: adjusting stack size of executable compiled by gcc
- From: Mike Stump <mrs at apple dot com>
- To: tony vong <tonyvong2002 at yahoo dot com>
- Cc: gcc-help-help at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Mon, 27 Sep 2004 13:15:51 -0700
- Subject: Re: adjusting stack size of executable compiled by gcc
On Monday, September 27, 2004, at 06:12 AM, tony vong wrote:
I am writing a simulator using c++. I am suspecting my
program is hitting some kind of stack limit because:
2. how do I increase the stack size when I compiled it
with gcc ???
Please don't use the gcc list, it isn't for what you think it is for.
See ulimit -a (ulimit -s) from bash, if you must
In portable code, pretend the stack is 1MB large and each frame takes
128 bytes + whatever variables you need, you won't go wrong. For
things larger, use malloc/new.