任务管理器的精确度如何?

发布于 2024-09-13 16:51:52 字数 224 浏览 3 评论 0原文

我有一个C++应用程序,当我观察任务管理器时,它显示应用程序的内存使用量逐渐增加。

我手动检查源代码,并使用 Visual Leak Detector for Visual C++ 来查找内存泄漏,但我找不到任何。 是否100%存在内存泄漏,而我找不到它,或者任务管理器是否有可能误导我?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

怎言笑 2024-09-20 16:51:52

事实并非如此。它有多个内存统计选项(使用视图+列),版本很重要,但默认视图显示工作集。你的程序使用的虚拟内存有多少实际上是在 RAM 中。这是一个可能变化很快的统计数字。例如,只需最小化应用程序的主窗口即可。

它可以显示的虚拟机大小也不是很大。该数字包括空闲堆块。获取实际使用的内存非常棘手,请阅读 HeapWalk SDK 文章中的小字。

它对于泄漏检测是没有用的,除非你泄漏了它的一部分。

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.

怎樣才叫好 2024-09-20 16:51:52

我使用 Process Explorer 作为任务管理器的替代品。它显示 CPU/内存使用情况的历史图表

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

一杯敬自由 2024-09-20 16:51:52

我使用扩展任务管理器
http://www.warecase.com/products.asp

这对于调试目的特别有用检查线程是否存在以及其他此类情况。如果您的流程或应用程序有 pdb,它可以提供大量信息。

也许您可以使用 DevPartner 来识别内存泄漏。这非常有用。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文