This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: excessive memory consumption
- To: jason at cygnus dot com, jbuck at synopsys dot com, egcs at cygnus dot com
- Subject: Re: excessive memory consumption
- From: Corey Kosak <kosak at cs dot cmu dot edu>
- Date: Sun, 05 Oct 1997 21:08:01 -0400
The following program still takes nearly 200M of memory to compile,
even with Jason Merrill's October 3 patch.
% gcc -v
Reading specs from /afs/cs/project/cmcl-kosak/patchloco/lib/gcc-lib/alpha-dec-osf3.2/egcs-2.90.11/specs
gcc version egcs-2.90.11 970929 (gcc2-970802 experimental)
% cat crack.cc
#include <vector>
class foo_t {
public:
vector<int> v;
};
class bar_t {
public:
vector<foo_t> bar;
};
int main()
{
bar_t bar;
}
% limit datasize 200M
% g++ -O2 -Wall crack.cc
/bin/ld:
Warning: Linking some objects which contain exception information sections
and some which do not. This may cause fatal runtime exception handling
problems (last obj encountered without exceptions was /afs/cs/project/cmcl-kosak/patchloco/lib/libstdc++.a).
/bin/ld:
Warning: Linking some objects which contain exception information sections
and some which do not. This may cause fatal runtime exception handling
problems (last obj encountered without exceptions was /afs/cs/project/cmcl-kosak/patchloco/lib/libstdc++.a).
% limit datasize 195M
% g++ -O2 -Wall crack.cc
crack.cc: In function `int main()':
crack.cc:16: virtual memory exhausted