如何从FastMM获取堆栈跟踪 [英] How to get a stack trace from FastMM

查看:132
本文介绍了如何从FastMM获取堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在以下帖子中注意到,您可以从FastMM中获取堆栈跟踪,以显示对象分配的内容:

I've noticed in the following post that you can get a stack trace out of FastMM to show what appears to be where an object was allocated:

如何使用fastMM跟踪棘手的内存泄漏?

我不能找到有关如何在Delphi 2009中启用此功能的任何信息。

I can't find any information on how to enable this in Delphi 2009, though.

我已将 ReportMemoryLeaksOnShutdown 设置为true,所以我获取基本报告,但如何获取堆栈跟踪报告?

I have set ReportMemoryLeaksOnShutdown to true so I get the basic report, but how do I get the stack trace report?

推荐答案

FastMM的内部Delphi版本不支持堆栈跟踪。

The internal Delphi version of FastMM doesn't support stack traces.

如果要记录内存泄漏堆栈跟踪,您必须:

If you want to log the memory leak stack traces, you have to:

将其作为第一单元包含在您的项目中:

include it as the first unit in your project:

program YourProject;

uses
  FastMM4, // <--
  SysUtils,
  Forms,
  ...


  • 中启用 FullDebugMode 选项FastMM4Options.inc

  • enable the FullDebugMode option in FastMM4Options.inc

    映射文件设置为详细在链接项目选项 FastMM_FullDebugMode.dll 处理 .map 文件)

    set Map file to Detailed in the linking project options (the FastMM_FullDebugMode.dll processes the .map file)

    在您的二进制(或Windows System32 )目录中添加 FastMM_FullDebugMode.dll

    add the FastMM_FullDebugMode.dll in your binary (or Windows System32) directory

    这篇关于如何从FastMM获取堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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