template instantiation problems !? [was: egcs-g++-97112: virtual memory exhausted]
Max Lawson
mlawson@drfmc.ceng.cea.fr
Wed Nov 26 06:10:00 GMT 1997
> From: Max Lawson <mlawson@drfmc.ceng.cea.fr>
> Subject: egcs-g++-97112: virtual memory exhausted
>
> Hi !
>
> I'm using the lattest snapshot to compile a test
> program on a i586-pc-linux-glibc1 with 46M RAM.
>
> This program uses lots of template methodes.
>
> The compilation fails when using the "-O6" flag with
> the message "virtual memory exhausted ..". When compiled
> with the "-O2" optimization flag _only_ 80% of memory
> is used by cc1plus and the compilation is successfull.
>
> Is this a bug ? Or do I have to used a given switch to
> make things run ?
>
Hi,
I've seen on the egcs-bugs list that someone else has
reported a similar misbehaviour of cc1plus (November_1997::
"Memory leak with -O -Wall" by P.Schmid) on a i386-glibc1.
This rings me bell !.
In an earlier version of egcs, memory was not released during
during the instatiation of templates and someone provided
a patch against. This bug back may be in the current release !?
That my .002cents. Sorry that's all I can do; don't know
about a compiler internals.
Thanks.
Regards, Max
P.S. Mumit Khan noticed a difference between our testsuite results.
I have a typename5.C failure he didn't have with the current snapshot
and I didn't have with the previous one. Is it related to the problem
above ?
More information about the Gcc
mailing list