How accurate is the task manager?

I have a C ++ application, when I observe the task manager, it shows that the memory usage of the application is gradually increasing.

I manually check my source code and I used the Visual Leak Detector for Visual C ++ to find a memory leak, but I could not find Any. Is it 100% that there is a memory leak, and I could not find it, or is there any chance that the task manager will get lost in me?

+2
source share
3 answers

This is not true. It has several options for memory statistics (use View + Columns), and the version matters, but the default view shows the working set. How much virtual memory your program actually uses in RAM. This is a statistical number that can change very quickly. Just hide the main application window, for example.

The size of the VM that it can show is also small. This number includes free heap blocks. Getting the actual memory to use is very difficult, read the small print in the SDK article for HeapWalk.

It is useless to detect a leak if you do not leak it.

+4
source

I am using Process Explorer as a replacement for Task Manager. It shows diagrams of CPU / memory usage history

+1
source

I am using the Advanced Task Manager http://www.warecase.com/products.asp

This is useful for debugging purposes, especially to check if a thread exists or not and other similar cases. It can provide a lot of information if you have pdb for your process or application.

Perhaps you can use DevPartner to identify memory leaks. It is very useful.

0
source

Source: https://habr.com/ru/post/1398114/


All Articles