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


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

Re: excessive memory consumption



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


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