* Stack usage of g77-generated code: Worth a compiler option ?
@ 1998-12-01 17:59 Toon Moene
1998-12-02 13:08 ` Craig Burley
0 siblings, 1 reply; 2+ messages in thread
From: Toon Moene @ 1998-12-01 17:59 UTC (permalink / raw)
To: Craig Burley; +Cc: egcs
Craig and others on the egcs list,
Now that I am fully operational on my laptop (except for a modem
connection and hence CVS'd snapshots), I decided to try to run our
standard weather forecasting test suite.
Due to the fact that Modern Linux is ELF based (as opposed to my -
loosely speaking - COFF based NEXTSTEP system) I didn't have to
force all arrays (independent of size) to the stack. [ For those
who do not know this: NEXTSTEP's object format tends to fill all
statically allocated arrays with zeros, which leads to huge object
files and ditto .a libraries ]
However, my original (around '94) complaint about g77's default
still has merit: I compared the memory requirement of a run
compiled with the standard "arrays of size above 32Kbytes are
statically allocated" vs. "all arrays are allocated on the stack".
The first option led to an executable with 51 Mbyte of RSS, the
second to one of 43 Mbyte. This seems a significant difference to
me.
The reason for this difference is that stack space gets reused,
while statically allocated local arrays are there forever ;-)
Would it be possible to make the stack/nostack cutoff a compile
time option ? That sure beats rebuilding the compiler ...
Thanks in advance,
Toon.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Stack usage of g77-generated code: Worth a compiler option ?
1998-12-01 17:59 Stack usage of g77-generated code: Worth a compiler option ? Toon Moene
@ 1998-12-02 13:08 ` Craig Burley
0 siblings, 0 replies; 2+ messages in thread
From: Craig Burley @ 1998-12-02 13:08 UTC (permalink / raw)
To: toon; +Cc: burley
>Would it be possible to make the stack/nostack cutoff a compile
>time option ? That sure beats rebuilding the compiler ...
I think it should be pretty straightforward. It'd presumably work
like the -ffixed-line-length-N option, in case you (or someone else)
would like to try...I probably won't get to it *this* year myself!
tq vm, (burley)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-12-02 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-01 17:59 Stack usage of g77-generated code: Worth a compiler option ? Toon Moene
1998-12-02 13:08 ` Craig Burley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).