cc1plus memory exhausted (>200Meg)
Fred Richardson
frichard@bbn.com
Tue Oct 7 23:55:00 GMT 1997
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
%>
More information about the Gcc-bugs
mailing list