找到“非泄漏”的策略或工具内存使用问题在Delphi中? [英] Strategy or tools to find "non-leak" memory usage problems in Delphi?

查看:188
本文介绍了找到“非泄漏”的策略或工具内存使用问题在Delphi中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

服务器更新后,一个旧应用程序开始耗尽内存。根据FastMM4和EurekaLog,没有内存泄漏(28字节除外),所以我假定所有的内存都被释放了当应用程序关闭时。



有没有适合跟踪这种内存问题的工具或策略?

解决方案


  1. 越来越多的内存消耗是一个应用程序问题。它不是一个bug,它可以发现FastMM4或EurekaLog。从他们的角度来看 - 应用程序只是正确地使用内存。

  2. 使用AQTime,MemProof(很难找到,D7是最后支持的版本(?)),SleuthQA(类似于MemProof)或类似的内存分析器,您可以实时跟踪应用程序之外的内存使用情况。

  3. 使用FastMM4,GetMemoryManagerState / GetMemoryManagerUsageSummary,可以跟踪应用程序的内存使用情况。将该信息输出到跟踪文件中,并在运行后进行分析。或者为上述过程之一制作简单的包装功能,这将返回curent内存使用。并从IDE调试器评估/修改调用,添加到监视器或调用OutputDebugString,并查看当前内存使用情况。

注意,如果内存被一些DLL所吸引,那么你可能不会看到她的内存使用(3)。使用(2)。



分析内存使用情况和应用程序执行的任务,您可能会发现导致内存使用量增加的原因。


One old application started to consume memory a lot after server update. Memory usage seems to rise with out limit until program hangs.

According to FastMM4 and EurekaLog, there's no memory leak (except 28 bytes), so I assume all memory is freed when application is shutdown.

Are there any tools or strategies suitable for tracking this kind of memory problem?

解决方案

  1. The growing memory consumption is an application issue. It is not a bug, which can discover FastMM4 or EurekaLog. As from they point of view - application just correctly uses the memory.
  2. Using AQTime, MemProof (hard to find, D7 is last supported version (?)), SleuthQA (similar to MemProof) or similar memory profilers, you can track the memory usage outside of application in real-time.
  3. Using FastMM4, GetMemoryManagerState / GetMemoryManagerUsageSummary you can track memory usage from application. Output this information into trace file and analyze it after run. Or make simple wrapping function for one of the above procedures, which will return curent memory usage. And call it from IDE Debugger Evalute / Modify, add to Watches or call OutputDebugString, and see the current memory usage.

Note, if memory is eated by some DLL then you may not see her memory usage using (3). Use (2).

Analyzing the memory usage and the tasks performed by the application, you may discover what leads to raised memory usage.

这篇关于找到“非泄漏”的策略或工具内存使用问题在Delphi中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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