Yesterday I tested an application written in C++ by me. I launched the application in Visual Studio with Debug mode and left it run overnight along with some other applications (Firefox, Explorer, MS Word...). This morning I checked the test PC and found out that:
- The Visual Studio hit an exception that said "not enough memory" in an memory allocating statement.
- Firefox was also killed due to lack of memory.
- The Task Manager showed that memory usage was about 6.5 GBs (8.0 GBs installed). I summed up memory usage of all applications shown in Task Manager but the sum was much smaller than 6.5 GBs.
I checked the memory usage of the Visual Studio and my application but they were all light. I then killed my application along with the Visual Studio (vis Task Manager) but the memory usage did not decrease. I then tried to kill some other processes but the memory usage still did not reduce. After all, I had to restart the system to take back the memory.
- As given in the accepted in What REALLY happens when you don't free after malloc?, I supposed that my application was not the reason of the memory leak because if it was then the memory usage would decrease (did not decrease, in fact) after the application was killed. Am I correct?
- I heard about
nonpaged pool memory leak
via Windows using too much RAM, how to diagnose resource hog that has similar symptoms to mine (i.e. after killing some suspect processes but the memory usage does not decrease). Can my application fall into the situation? How can it be possible?