[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sparc DFLDSIZ
On Sat, Jun 05, 1999 at 04:28:49PM -0700, Marco S Hyman wrote:
> A make build on my sparc fails building lynx since the conversion to
> egcs. It's an out-of-virtual-memory failure that is resolved by
> doing a "ulimit -S -d 65536" (I use ksh). Now 64 Mbytes may be
> more than is needed, but the default 16 clearly isn't enough.
More precisely, this happens in LYMain.c.
I've checked that file on a sparc, pitting egcs vs. gcc 2.8.1.
The mainloop function is where the discrepancy appears: egcs allocates
twice as much memory as gcc used to.
I've put this as a question on the egcs-bugs mailing-list. No return yet.
My intuition tells me this is probably an allocation policy change in egcs:
in order to be more efficient (and based on real code sizes), they probably
bumped up some allocation boundary... so egcs asks for more memory, but does
not use that much more... or maybe gcc was close to the threshhold, and egcs
crossed that threshhold ? it's a bit hard to know what's going on inside...
like, when you use malloc, not all calls to malloc result in a system call
to grab more memory...
> Is there any reason why DFLDSIZ couldn't be bumped up to 32 Meg? I
> do not pretend to understand what might be affected by doing this.
Theo's well-being. He seems to believe that compilers should stay
small forever, and that bumping such limits should occur under no
circumstance.
> Also, for my information, why are these numbers so low when compared to
> something like the i386. An RTFM pointer would be appreciated.
Well, this is weird, especially considering the respective compilers internal.
i386 is special: it's a SMALL_REGISTER class machine, whereas sparc has a
full complement of registers. So, it is quite normal that a sparc compiler
will consume more memory than an i386 one (larger code, and larger
combinatorics considering the higher number of registers).
--
Marc Espie
|anime, sf, juggling, unicycle, acrobatics, comics...
|AmigaOS, OpenBSD, C++, perl, Icon, PostScript...
| `real programmers don't die, they just get out of beta'