Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I suck up all the computer's memory? 1

Status
Not open for further replies.

jleung

Programmer
Jul 30, 2001
5
US
I want to test what would happen to my program when all of my memory has ran out, how could I do so? thanks,
 
do

while(1)
{
_asm pusha
}


or

double* x()
{
return new double[100];
}
int main()
{
while(1)
{
x();
}
return 0;
}
John Fill
1c.bmp


ivfmd@mail.md
 
Is there anyway I could do it with malloc?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top