How precise is Task Manager?

流过昼夜 提交于 2019-11-27 04:51:46

问题


I have a C++ Application, when I observe Task Manager, it shows that applicaiton's memory usage increases gradually.

I manually check my source code, and I used Visual Leak Detector for Visual C++ to find memory leak, but I couldn't find any. Is it 100% that there is a memory leak, and I couldn't find it or is there any possibility that Task Manager misguide me?


回答1:


It isn't. It has several options for memory statistics (use View + Columns) and the version matters but the default view shows the working set. How much of the virtual memory your program uses is actually in RAM. That's a statistical number that can change very quickly. Just minimize the main window of your app for example.

The VM size it can show isn't great either. That number includes free heap blocks. Getting actual memory in use is very tricky, read the small print in the SDK article for HeapWalk.

It is useless for leak detection, unless you leak gobs of it.




回答2:


I use Process Explorer as replacement for Task Manager. It shows history graphs for CPU/mem usage




回答3:


I use Extended Task manager http://www.warecase.com/products.asp

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

Probably you can use DevPartner for identifying memory leaks. It is very useful.



来源:https://stackoverflow.com/questions/3467805/how-precise-is-task-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!