This is the mail archive of the
mailing list for the GCC project.
Re: how do I increase stack space for a program compiled with gcc?
- To: Joern Rennecke <amylaar at onetel dot net dot uk>
- Subject: Re: how do I increase stack space for a program compiled with gcc?
- From: Ted Huntington <thunting at uci dot edu>
- Date: Mon, 29 Oct 2001 09:49:59 -0800
- CC: Tim Prince <tprince at computer dot org>, dewar at gnat dot com, gcc at gcc dot gnu dot org
- References: <200110282344.XAA30614@meolyon.local>
Thanks for your answers!
This is on Linux Redhat 7.1. I found a flag that allows more stack space
-mpreferred-stack-boundary=2. This changes the alignment of data on the stack to
2 bytes(?). This gave me enough stack space.
So now I can continue to port my game "2020" to Linux!
Joern Rennecke wrote:
> Tim Prince wrote:
> > Several OS where gcc is commonly used do not even provide adequate
> > support for changes to default stack size. If you are using redhat 6.2,
> > an upgrade may be indicated. Later versions of redhat, so I've been
> > told, have a larger, but still immutable, stack region.
> Funny, I remember that I could get the stack to change the sign of the address
> with some largish allocations sometime around 1995 on an SLS / Slackware /
> funet / tsx11 system.
> (I used mmap for gcc.c-torture/execute/loop-2[ef].c because that
> didn't require root privileges to raise the stack hard limit...)
> Joern Rennecke | gcc expert for hire
> email@example.com | send enquiries to: firstname.lastname@example.org
Programmer Analyst I
University of California, Irvine
PO Box 19557
Irvine, CA 92623-9557
web page: http://sun3.lib.uci.edu/~busoff/webpages/ted.htm
8:00a-12:00p Business Office (949) 824-8926
1:00p-5:00p Multimedia Resource Center (949) 824-1674