How to allocate 1.6TB of ram
Posted: Sun Nov 22, 2009 9:42 pm
First you need Linux, and a 64-bit processor...
Good luck trying that in Windows.
Note: there's only 8GB of ram on that server. It froze up for a while and I thought I had maybe lost my VNC connection but it suddenly started responding again so I could CTRL+C out of it
Server running as if nothing ever happened.
The code behind this:
Archived topic from AOV, old topic ID:4846, old post ID:31365
Good luck trying that in Windows.
Note: there's only 8GB of ram on that server. It froze up for a while and I thought I had maybe lost my VNC connection but it suddenly started responding again so I could CTRL+C out of it
Server running as if nothing ever happened.
The code behind this:
Code: Select all
#include <fstream>
#include <iostream>
using namespace std;
void WriteNum(int num)
{
fstream fout("MB.txt",ios::out);
fout<<num<<"MB";
fout.close();
}
int main()
{
unsigned long int i=0;
while(1)
{
char * nomnomnom = new char[1048576]; //eat one MB of ram
i++;
WriteNum(i);
cout<<"
Eating "<<i<<"MB...";
}
return 0;
}