FastMM4,如何读取日志文件? [英] FastMM4, how to read the log file?

查看:146
本文介绍了FastMM4,如何读取日志文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个软件,所以我刚开始在我的项目中使用FastMM4(实际).

i'am working on an software,so i have just started using FastMM4 (for real) in my project.

我在网上找到了有关如何在FastMM4中获取line number的信息,我获得了行号,但是我可以弄清楚日志中的其他信息意味着什么?

i have found on the net on about how to get the line number in FastMM4,i got the line number but i can figure out what does the other information in the log means?

我在日志文件中有这个

This block was allocated by thread 0x15F8, and the stack trace (return addresses) at     the time was:
402E86 [system.pas][System][System.@GetMem][2648]
403A3B [system.pas][System][System.TObject.NewInstance][8824]
403DAA [system.pas][System][System.@ClassCreate][9489]
403A70 [system.pas][System][System.TObject.Create][8839]
46A257 [u_home.pas][u_home][u_home.TForm1.SpeedButton1Click][80] {<-memory leak is here, but what are the Other detections?}
443AAC [Controls.pas][Controls][Controls.TControl.Click][5226]
46958B [Buttons.pas][Buttons][Buttons.TSpeedButton.Click][1211]
46956B [Buttons.pas][Buttons][Buttons.TSpeedButton.MouseUp][1204]
443FB2 [Controls.pas][Controls][Controls.TControl.DoMouseUp][5352]
441BA0 [Controls.pas][Controls][Controls.TControl.SetMouseCapture][4379]
444042 [Controls.pas][Controls][Controls.TControl.WMLButtonUp][5364]

The block is currently used for an object of class: TStringList

The allocation number is: 440

在此leak

   46A257 [u_home.pas][u_home][u_home.TForm1.SpeedButton1Click][80] {<-memory leak is here, but what are the Other detections?}

我的代码

 procedure TForm1.SpeedButton1Click(Sender: TObject);
  var
  str : TStringList;
  begin
  str := TStringList.Create;  {<--im not freeing the, so leak}

  end;

这是call stack

我在网上搜索,但不知道还有其他发现...

i searched on net but i do not know what are the other detections...

402E86 [system.pas][System][System.@GetMem][2648]
403A3B [system.pas][System][System.TObject.NewInstance][8824]
403DAA [system.pas][System][System.@ClassCreate][9489]
403A70 [system.pas][System][System.TObject.Create][8839]

{Other then this}
46A257 [u_home.pas][u_home][u_home.TForm1.SpeedButton1Click][80] {<-memory leak is here, but what are the Other detections?}
{Other then this}

443AAC [Controls.pas][Controls][Controls.TControl.Click][5226]
46958B [Buttons.pas][Buttons][Buttons.TSpeedButton.Click][1211]
46956B [Buttons.pas][Buttons][Buttons.TSpeedButton.MouseUp][1204]
443FB2 [Controls.pas][Controls][Controls.TControl.DoMouseUp][5352]
441BA0 [Controls.pas][Controls][Controls.TControl.SetMouseCapture][4379]
444042 [Controls.pas][Controls][Controls.TControl.WMLButtonUp][5364]

我使用delphi 2006

我已经打开并在delphi 6, delph 7中尝试过相同的操作

i have opened and tried the same in delphi 6, delph 7 also

已选中 我发现这与fastMM $检测g和delphi中已经存在的一些泄漏的记录有关. 如何使用fastMM跟踪棘手的内存泄漏? 这用于记录泄漏,但是它们是错误吗? 使用FastMM4,如何注册泄漏的字符串?

checked i have found this related to fastMM$ detectiong and registration of some leaks which is already in delphi. How to track down tricky memory leak with fastMM? and this for registering the leak but are they bugs? Using FastMM4, how to register leaked string?

FastMM4,Delphi6,TApplication泄漏?

are they just the steps leading to the memory leak?

推荐答案

日志中包含的调用堆栈导致内存分配泄漏.

What you have in the log there is the call stack that resulted in the memory allocation that leaked.

您可以在问题中的调用堆栈中看到它的用处.想象一下,您只有最上面的那条导致泄漏的电话

You can see how useful it is in the call stack in your question. Imagine that you only had the top line, the call that resulted in the leak

402E86 [system.pas][System][System.@GetMem][2648]

该信息本身几乎没有用,因为所有堆分配都通过GetMem进行.调用堆栈将您指向导致调用GetMem的事件.这就是找出导致泄漏的原因的原因.

That information on its own is pretty much useless since all heap allocations go through GetMem. It is the call stack that points you to the events that led up to the call to GetMem. And that's what pinpoints what caused the leak.

这篇关于FastMM4,如何读取日志文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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