This is the mail archive of the 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: how do I increase stack space for a program compiled with gcc?

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
>           |  send enquiries to:

Ted Huntington
Programmer Analyst I
Main Library
University of California, Irvine
PO Box 19557
Irvine, CA 92623-9557
web page:
8:00a-12:00p Business Office (949) 824-8926
1:00p-5:00p  Multimedia Resource Center (949) 824-1674

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