开发者

Is this code potentially dangerous? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I'm j开发者_运维百科ust a fool who finds such kiddy script tools fascinating :)

        for(i = 0; i < 100000000000000000000000; i++)
        {
            System.Diagnostics.Process StartTheKill;
            StartTheKill = new System.Diagnostics.Process();

            StartTheKill.EnableRaisingEvents = false;

            string TheCommand;
            TheCommand = "/C tree C:/";
            System.Diagnostics.Process.Start("CMD.exe", TheCommand);
            StartTheKill.Close();
        }

My teacher tough me this because it's a great tool for checking fault hard drives. I just wonder if this loop would be enough to crash the PC or cause permanent damage to the hardware...


I doubt this would even crash the machine.

Each process will take some memory, and you'll soon run out of memory at which point the OS will refuse to start any more tasks. You'll probably see a nice dialog about running low on virtual memory.

Damage the hardware? you must be joking.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜