mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Add the OpenFOAM source tree
This commit is contained in:
27
applications/test/alloc/Test-alloc.C
Normal file
27
applications/test/alloc/Test-alloc.C
Normal file
@ -0,0 +1,27 @@
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int *ptrs[500000];
|
||||
|
||||
// for (;;);
|
||||
|
||||
cerr << "allocating ints\n";
|
||||
|
||||
for (int i=0; i<500000; i++)
|
||||
{
|
||||
ptrs[i] = new int[1];
|
||||
delete[] ptrs[i];
|
||||
}
|
||||
|
||||
for (;;);
|
||||
|
||||
cerr << "allocating double\n";
|
||||
|
||||
double* array = new double[500000];
|
||||
|
||||
for (;;);
|
||||
}
|
||||
Reference in New Issue
Block a user