excessive memory consumption
Corey Kosak
kosak@cs.cmu.edu
Sun Oct 5 18:08:00 GMT 1997
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
More information about the Gcc
mailing list