This is the mail archive of the gcc@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]
Other format: [Raw text]

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.


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