This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/test/alloc/newTest.C

31 lines
441 B
C
Raw Normal View History

#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 << "alloacting doubles\n";
double* doubles = new double[500000];
for (;;);
}