How do programmers DIY Winter?

Source: Internet
Author: User
CPU Heating Code As follows:

DWORD winapi cpuhotter (pvoid para)
{
While (1 );
Return 1;
}
 
The code that heats up the memory is as follows:

DWORD winapi memhotter (pvoid para)
{
Char * mem = new char [10000];
While (1)
{
For (INT I = 0; I <10000; I ++)
{
Mem [I] = 0x99;
}
}
Return 1;
}
 
Finally, the code that heats up the hard disk:

DWORD winapi diskhotter (pvoid para)
{
File * FP;
Fp = fopen ("_", "A + ");
While (1)
{
For (INT I = 0; I <10000; I ++)
{
Fwrite ("1", 1, 1, FP );
}
Rewind (FP );
}
Return 1;
}

The main function can be used to create the above three threads. This code is compiled and run successfully in the athlon 1.26 + 256 m + VC 6.0 environment. Windows 2000 runs for three days and the indoor temperature continues to rise. It is proposed to apply for a national patent. Influenced by open-source ideasSource codeHope to bring you a warm winter.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.