问题描述
我有一个C ++应用程序,当我观察到任务管理器,它显示应用程序的内存使用量逐渐增加。
我手动检查我的源代码, a href =http://vld.codeplex.com/ =nofollow>视觉泄漏检测器Visual C ++ 找到内存泄漏,但我找不到任何。
是100%的内存泄漏,我找不到它,或有任何可能性任务管理器误导我?
不是。它有几个内存统计选项(使用视图+列)和版本很重要,但默认视图显示工作集。你的程序使用多少虚拟内存实际上是在RAM中。这是一个可以很快变化的统计数字。只需最小化您的应用程序的主窗口,例如。
它可以显示的VM大小不是很大。该数字包括空闲堆块。获取实际使用的内存是非常棘手的,请阅读HeapWalk的SDK文章中的小页面。
这对于泄漏检测是没有用的,除非你泄漏gobs。 / p>
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?
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.
这篇关于任务管理器有多精确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!