Wednesday, April 25, 2012

I was REALLY bored... so I wrote TheMemoryEater1000


I haven't posted anything in a while, so here is The Memory Eater: 1000. All it does it eat memory until it crashes... cuz yeah... why not. The 2000 version might have more features, but hopefully I won't be so bored I have to write it.

 //THE MEMORY EATER: 1000  
 #include <iostream>  
 using namespace std;  
 void CreateDumbMemory( int INPUT )  
 {  
      int KBToEat = INPUT * 1024;  
      for(int x = 0; x < KBToEat ; x++ )  
      {  
           new char[1024];  
      }  
      cout << "OMNOMNOM! (ate " << INPUT << "meg)\n";  
 }  
 void main()  
 {  
      int INPUT;  
      cout << "I am the Memory Eater 5000!\n\n";  
      do  
      {  
           cout << "Please Enter (in MegaBytes)\n"   
                "how more memory I should eat?\n:";  
           cin >> INPUT;  
           CreateDumbMemory( INPUT );  
      }while(INPUT);  
 }  

No comments:

Post a Comment