In my case, it's a hardware problem (it sometimes even freezes before Windows starts, in the memory check screen), so reformatting won't change anything.
The weird thing is that mostly it hangs or freezes when it's been running for just a few minutes, once it's been running for half an hour, it works fine...