My computer (Windows XP SP3) has a severe problem. I leave it running over night and in the morning it is not possible to log in again. There are error message boxes that say that there is not enough memory. Sometimes the screen resolution has changed to very low. And sometimes I get the error message "Error connecting to existing session for <user> (Id 0). A device attached to the system is not functioning." I cannot even shut down my computer; I have to pull the plug. It's worth mentioning that during the day I have no problems like that at all. It is only over night.
I already cleared all energy options so that the computer doesn't go to sleep. But it didn't help. Also the event logs don't contain any entries.
I suspect that some process consumes a lot of memory but I have no idea how to find out which because in the morning my computer is not usable. Is there any tool that helps me logging memory consumption of running processes? Or do you have other ideas how I could find out what the problem is?