This is the mail archive of the gcc@gcc.gnu.org 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: (C++) High memory usage with templates



Chris wrote:

> When compiling programs that make heavy use of templates (mainly the
> STL), I often see cc1plus wanting about 15 megs of RAM. On my 24 meg
> machine this is major performance hit. (I've not dared try it on my
> 10 meg machine!)

You haven't seen anything yet: when I try to compile examples from the
blitz library (http://monet.uwaterloo.ca/blitz/) I see memory usages
of about 400M from cc1plus.

> Is this normal? Is there any way I can reduce this memory usage?

So yes, this is normal. And the way to reduce this seems to be to fund
Mark Mitchell to reduce it :-) He has improved the memory usage by some
10-20% in the last weeks.

-- kga
-------------------------------------------------------------------------
Klaus-Georg Adams        Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie, Lehrstuhl II            Tel: 49(0)721 608 3485
Universität Karlsruhe, D-76128 Karlsruhe
-------------------------------------------------------------------------


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