This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: virtual memory exhausted when optimizing


Yes, first I thought that this might be a problem with the version of gcc or libstdc++ I have running here, but I could reproduce it with different versions of both packages on different machines.
I also tried the intel compiler and that one compiles for hours even without any optimizations options specified and as far as I know it comes with its own libstdc++.
I also showed the code to some other people that know some c++ and nobody could explain this behavior. Unfotunatelly I don't know any real c++ guru. But in either the gcc or the libstdc++ FAQ, the "virtual memory exhausted" error was mentioned and that it can happen with template intensive libraries.
O.K. I included the class that produces the error since it probably is something really stupid I am doing. I can't imagine that this should be a problem with the software since a lot of people must have done something similar before.
I just tried the compile again with g++ v3.2 and libstdc++ v3.2 and it compiles fine without optimization although it takes about 2.5 minutes on a 1GHz machine. Yesterday I tried it with -O1 and had to stop the compile after about 4 hours. With g++ 3.2 I did not get the "virtual memory exhausted" error so far because it only used about 500MB of RAM, only with gcc 2.96 on another machine the compiler tried to use more than 1GB and crashed.
I hope the included code will help to resolve this strange compile behavior.

Thanks again

Ralph

>... seems to be a problem with the compiler and or libstdc++! You should
>probably post code that reproduces your problem, and cc gcc@gnu.org.
>
>-benjamin

Attachment: compileProblem.tar.bz2
Description: BZip2 compressed data


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