Re: GCC stack size
Re: GCC stack size
- Subject: Re: GCC stack size
- From: Jan Brittenson <email@hidden>
- Date: Fri, 20 Feb 2009 16:54:39 -0800
Ryan McGann wrote:
We are currently using -O3 because the code is pretty compute-bound,
and on other platforms -O3 has a nice 5% boost compared to -O2. But
changing it to -O2 doesn't even help, we have to go all the way to -O1
to get a usable stack of 400 bytes (still 4x larger than our Linux
driver).
These are shorthand to turn on/off the various optimization options.
If I were you I'd find out what exactly they expand to, and which of the
options cause the stack bloat.
Then I'd explicitly turn off that, or those, optimizations. It may take
some guesswork and experimentation
with the a la carte options. You might also be able to find a way to
reorder the code to work around.
For instance, if it's caused by -fstack-realign, then try compiling with
-O3 -fno-stack-realign.
The difference from your Linux driver is probably just a function of gcc
version used. When your Linux
build environment catches up you'll likely find you have the foot print
issues there as well.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden