5 int main(int argc, char *argv[])
9 cerr << "Usage: " << argv[0] << " <number of Mb per chunk>\n";
13 int nBytes = (1024U*1024U)*atoi(argv[1]);
17 for (unsigned i=1;; i++)
19 cPtr = new char[nBytes];
22 for (int j=0; j<nBytes; j++)
28 cout << "allocated " << i*nBytes/(1024U*1024U) << " Mbytes" << endl;