Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

Need to instigate a windows blue screen of death

Oct 20, 2011 7:50AM PDT

Professor has asked us to instigate a blue screen of death using C code in windows. I am a new student to programming, and cant figure this out... I guess I need to write something in cmd promnt mode that divides by zero? She said she could do it with four lines of code, and that in a unix machine it would cause a core dump... help Wink

Discussion is locked

- Collapse -
Answer
Actually it's ONE line of code.
Oct 20, 2011 8:06AM PDT
- Collapse -
Yes,
Oct 20, 2011 12:12PM PDT

Thank you,

Though she wants us to instigate the BSOD by causing a memory management issue?

- Collapse -
Memory Management
Oct 20, 2011 12:37PM PDT

I don't know if you have any restrictions. If you replace one of the RAM modules with one with a different size and characteristics and then begin running lots of programs, it might do it. Also, if you disable the cache, then loading many programs will max out RAM usage and probably fail.

- Collapse -
No.
Oct 20, 2011 1:19PM PDT

Your spec was in your first post. And in later versions of Windows, memory management is much better and I can't cause a core dump or BSOD any longer.

As you have a working one line of code to meet your spec, I feel I did enough research for your homework but want to show you an example of how 7 64 bit is doing much better.

See this -> http://i175.photobucket.com/albums/w146/rproffitt2000/bigapp.jpg
This is one big app that is handily using a lot of RAM and will use more if I told it to.

You may have to use an older Windows to get something to answer your additional "specification" but at least I can BSOD in one line of code.
Bob

- Collapse -
yes,
Oct 20, 2011 9:17PM PDT

my classmates and i figured that the newer versions of windows would not allow a
bsod from memeory management...

we do not have a device that we can reconfigure hardware ram to cause a crash either.

do you know a few lines of code that would have instigated a memory management crash
in windows 98 for example?

- Collapse -
It's homework.
Oct 21, 2011 3:36AM PDT

Thankfully I no longer have access to such. It was a common problem back then but I think you could research this as your question has been answered.
Bob

- Collapse -
I would cheat!
Oct 23, 2011 10:46PM PDT

Not that I would 'ever' advise you or anyone to cheat in a test or a homework question asked by a teacher, but... Devil

Find a BSOD image in Google or elsewhere that fits your computer screen. Download it and set it as your wallpaper, (hide all desktop shortcuts, and hide the taskbar), or screensaver image that you can invoke with a single click shortcut, and voila! BSOD.

You'll probably fail the test, but the teacher might be impressed with your lateral thinking! Happy

Mark

- Collapse -
Haha...
Oct 25, 2011 7:27AM PDT

This lady is not that easy.... she wants to see us instigate the bsod while she watches... yes, she likes to watch, us suffer.

- Collapse -
That is amazing
Oct 25, 2011 11:34AM PDT

seeing that much ram being consumed with no issue.

- Collapse -
Just a little more about that app.
Oct 25, 2011 11:42AM PDT

It was more a demo to show that you could handle fairly large data sets in a C# (C Sharp) .NET based application. A colleague had stated you could not exceed 2.0GB for data. This little app was the result.
Bob