Test-maxMem: Removed

This commit is contained in:
Henry Weller
2018-06-20 14:09:26 +01:00
parent e84fcce74c
commit 4d09d6c6f5
3 changed files with 0 additions and 35 deletions

View File

@ -1,2 +0,0 @@
Test-maxMem.C
EXE = $(FOAM_USER_APPBIN)/Test-maxMem

View File

@ -1 +0,0 @@
EXE_LIBS = /* $(FOAM_EXT_LIBBIN)/libfbsdmalloc.o */

View File

@ -1,32 +0,0 @@
#include <iostream>
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[])
{
if (argc != 2)
{
cerr << "Usage: " << argv[0] << " <number of Mb per chunk>\n";
exit(1);
}
int nBytes = (1024U*1024U)*atoi(argv[1]);
char *cPtr;
for (unsigned i=1;; i++)
{
cPtr = new char[nBytes];
/*
for (int j=0; j<nBytes; j++)
{
cPtr[j] = 0;
}
*/
cout << "allocated " << i*nBytes/(1024U*1024U) << " Mbytes" << endl;
}
return 0;
}