views:

75

answers:

1

Is it possible to instantiate a pointer using (unsafe) C# at any given memory address (which one would be the lowest?) and simply start overwriting the memory with continuous random data until a PC crashes?

Could someone provide me with an example?

+4  A: 

Until the PC crashes? No. Until your process crashes, then yes. But if you just want your process to crash, there's much easier ways of doing that then just overwriting random memory locations...

Windows uses a technique called virtual memory to make sure that any memory that you can access in process "A" cannot affect the memory that's being used by process "B" (unless you use explicit mechanisms to share memory). So one process cannot (normally) affect the memory in another.

Dean Harding
Very good answer, since it goes straight to the point. If I may add, you can't do that with C# nor with any language (unless you use some specific method or API). Pointers are always restricted to the process address space.
Bruno Brant