File size: 441 Bytes
5a600cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stream.h>

main()
{
    int* intPtrs[500000];

    cerr << "allocating ints\n";

    for (int i=0; i<500000; i++)
    {
        intPtrs[i] = new int[1];
    }

    cerr << "allocated ints\n";

    cerr << "deallocating ints\n";

    for (i=0; i<500000; i++)
    {
        delete[] intPtrs[i];
    }

    cerr << "deallocated ints\n";

    cerr << "allocating doubles\n";

    double* doubles = new double[500000];

    for (;;);
}