How to allocate 1.6TB of ram

This is a catch all off topic forum to talk about anything not covered by other sections.
Locked
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

How to allocate 1.6TB of ram

Post by Red Squirrel »

First you need Linux, and a 64-bit processor...

Image

Good luck trying that in Windows. :P

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;
}

Archived topic from AOV, old topic ID:4846, old post ID:31365
Honk if you love Jesus, text if you want to meet Him!
Locked