This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cc1plus memory exhausted (>200Meg)
- To: mmitchell at usa dot net
- Subject: Re: cc1plus memory exhausted (>200Meg)
- From: Fred Richardson <frichard at bbn dot com>
- Date: Wed, 8 Oct 1997 02:55:27 -0400
- CC: egcs at cygnus dot com, egcs-bugs at cygnus dot com
- Reply-to: frichard at bbn dot com
Mark-
I still have the same problem. G++ doesn't "blow-up" when using the
egcs STL, but it does run out of memory. Note that each instantiation
should match the appropriate vector constructor:
%> limit datasize 200000
%> cat foo.cc
#include <stdlib.h>
#include <iostream.h>
#include <algorithm>
#include <vector.h>
int main()
{
vector<int> int_vec(size_t(5), int(1));
vector<vector<int> > int_vec_vec(size_t(7), int_vec);
vector<vector<vector<int> > > int_vec_vec_vec(size_t(9), int_vec_vec);
cout << int_vec_vec_vec[3][3][3] << endl;
cout << "wow" << endl;
}
%> g++ -Wall -fno-exceptions -O2 -o foo foo.cc -lstdc++
foo.cc: In function `int main()':
foo.cc:14: virtual memory exhausted
%>