1 #include "StMemoryInfo.hh"
11 buf[0] =
new char[10000];
12 cout <<
"\n===> 10000 bytes allocated\n" << endl;
18 buf[1] =
new char[10000];
19 cout <<
"\n===> 10000 bytes allocated\n" << endl;
25 buf[2] =
new char[100000];
26 cout <<
"\n===> 100000 bytes allocated\n" << endl;
32 buf[3] =
new char[50000];
33 cout <<
"\n===> 50000 bytes allocated\n" << endl;
40 cout <<
"\n===> 100000 bytes freed\n" << endl;
45 buf[2] =
new char[100000];
46 cout <<
"\n===> 100000 bytes allocated\n" << endl;
52 for (
int i=0; i<4; i++)
delete buf[i];
53 cout <<
"\n===> all allocated memory freed\n" << endl;
58 cout <<
"\ndone" << endl;