Question

For purpose of an academic project I want to create a simple program to hang a computer by consuming all available RAM. I tried creating a string and increase its length using a while loop like string=string+string2. I takes so much time when string2 is short, even though I could use 100% ram but at last I get a OutOfMemoryException and so much memory is freed. Is there any effective way of doing this?

Was it helpful?

Solution

Not entirely possible as the OS will deal with the memory management thus you wont be able to do what you are trying to do especially in managed code. I also don't believe that an academic programme will have a course or instruct students to develop something like this. question sounds a little wierd

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top