Hey guys I wrote some code to test my page file size, and it's immediately crashing does anyone know what the issue could be?

Code:
#include <iostream>
#include <windows.h>
#include <Winbase.h>
#include <stdio.h>
#include <Winuser.h>
#include <limits.h>
#include <time.h>
using namespace std;
int main(int argc, char* argv[])
{
/* Variables */
clock_t startTime, endTime; // Initialize Timers
int freeBytes;
int freePage;
int freeVirtual;
// System Information
/*SYSTEM_INFO siSysInfo;
GetSystemInfo(&siSysInfo);
siSysInfo.dwPageSize // Page Size of System in Bytes*/
// System Memory Information
// http://msdn.microsoft.com/en-us/library/aa366772(VS.85).aspx
MEMORYSTATUS MemoryInfo;
GlobalMemoryStatus(&MemoryInfo);
// The amount of physical memory currently available, in bytes.
freeBytes = MemoryInfo.dwAvailPhys;
// The maximum amount of memory the current process can commit, in bytes.
freePage = MemoryInfo.dwAvailPageFile;
/* The amount of unreserved and uncommitted memory currently in the
user-mode portion of the virtual address space of the calling
process, in bytes. */
freeVirtual = MemoryInfo.dwAvailVirtual;
// Output Memory before program start
cout << "dwAvailPhys: " << MemoryInfo.dwAvailPhys << endl;
cout << "dwAvailPageFile: " << MemoryInfo.dwAvailPageFile << endl;
cout << "dwAvailVirtual: " << MemoryInfo.dwAvailVirtual << endl;

double valuesToTest[] = {0.5,0.6,0.7,0.8,0.9,0.95,0.99,1.0,1.01,1.12,1.5};
int numberOfNewByes;
int *arrayOfInts; //
// Loop through each value to test
for (int i=0; i<16; i++) {
cout << endl << "Value tested: " << valuesToTest[i] << endl;
/* Start the timer */
startTime = clock();
numberOfNewByes = (int) ( valuesToTest[i] * (freeBytes));
arrayOfInts = new int[numberOfNewByes/sizeof(int)];
// Output Memory
GlobalMemoryStatus(&MemoryInfo);
cout << "dwAvailPhys: " << MemoryInfo.dwAvailPhys << endl;
cout << "dwAvailPageFile: " << MemoryInfo.dwAvailPageFile << endl;
cout << "dwAvailVirtual: " << MemoryInfo.dwAvailVirtual << endl;
// Fill array with stuffer ones
for (int x=0; x < numberOfNewByes/sizeof(int); x++){
arrayOfInts[x]=1;
}
// Simple operation of adding 1 to every element
for (int x=0; x < numberOfNewByes/sizeof(int); x++){
arrayOfInts[x]=arrayOfInts[x]+1;
}
// Free memory
delete [] arrayOfInts;
cout << endl << "Time elapsed: " << ((double)(clock() - startTime) / (double)CLOCKS_PER_SEC ) << "seconds " << endl;
}
return 0;
}