Possible memory leak in g++

Daniel Merritt merritt@trakonic.com
Mon Jan 29 13:22:00 GMT 2001


I may be wrong, but while compiling
http://www.eskimo.com/~weidai/cryptlib.html with gcc 2.95.2, if optomisations 
are used the compiler (cc1plus) balloons up to massive proportions (over 
60meg on my system before I killed it). It happens with either -O2 or -O1. It 
occurs on the file eccrypto.cpp, when the following command is run:
g++ -O2 -w -pipe -c eccrypto.cpp 

The crypto++ page assures me that it should compile with gcc 2.95.2, so 
perhaps it's something on my system. Here's top after running it for a few 
seconds:
PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND           
16101 merritt   13   0 53664  52M  2168 R    95.6 41.8   1:19 cc1plus    

After adding more swap space, it eventually does finish compiling the file, 
to move onto others. If there anything I can do to help, or any more 
information I can provide, feel free to ask.


More information about the Gcc-bugs mailing list