MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / main

Function main

applications/test/alloc/Test-alloc.C:6–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace std;
5
6int main()
7{
8 int *ptrs[500000];
9
10// for (;;);
11
12 cerr << "allocating ints\n";
13
14 for (int i=0; i<500000; i++)
15 {
16 ptrs[i] = new int[1];
17 delete[] ptrs[i];
18 }
19
20 for (;;);
21
22 cerr << "allocating double\n";
23
24 double* array = new double[500000];
25
26 for (;;);
27}

Callers 3

Test.CFile · 0.70
Test-malloc.CFile · 0.70
Test-new.CFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected