Windows任务管理器显示进程内存仍在增长,即使没有内存泄漏 [英] Windows Task Manager shows process memory keeps growing even though there are no memory leaks

查看:475
本文介绍了Windows任务管理器显示进程内存仍在增长,即使没有内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序不断消耗越来越多的内存,就像在Windows任务管理器中看到的一样,最终由于内存不足而崩溃.但是,当我使用MemoryValidator(来自www.softwareverify.com)检查泄漏时,未检测到泄漏.为什么会这样?

My application keeps consuming more and more memory as seen in the Windows Task Manager and eventually crashes due to OutOfMemory. However when i check for leaks using MemoryValidator (from www.softwareverify.com) no leaks are detected. Why is this happening?

推荐答案

仅仅因为内存使用量的增长并不意味着它一定是泄漏"的.您可以简单地累积大量活动对象和/或非常大的活动对象(包含大量数据).

Just because there is a growing amount of memory usage doesn't mean it is necessarily 'leaking'. You could simply be accumulating a large number of live objects and/or very large ones (containing lots and lots of data).

如果您可以提供有关您使用的哪种语言以及应用程序在做什么的更多信息,我也许可以帮您提供一些更具体的信息!

If you can provide more information about what language(s) you are using and what the application is doing I can perhaps help out with some more specific information!

按评论更新 好吧,您只需要确保垃圾收集正确进行即可.我建议使用libgc库来帮助解决这个问题. http://developers.sun.com/solaris/articles/libgc.html

UPDATE AS PER COMMENTS Well, you'll just want to make sure the garbage collection is happening correctly. I'd suggest the libgc library to help with that perhaps. http://developers.sun.com/solaris/articles/libgc.html

我能想到的唯一另一件事是,您无意间维护了对对象的引用,因此它们只是堆积起来.

The only other thing I could think of as being the cause of this is that you are maintaining references to the objects somewhere unintentionally so they are just piling up.

这篇关于Windows任务管理器显示进程内存仍在增长,即使没有内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆