Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
991 views
in Technique[技术] by (71.8m points)

delphi - How to get a stack trace from 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:

How to track down tricky memory leak with fastMM?

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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

  • download the full version of the FastMM library

  • include it as the first unit in your project:

    program YourProject;
    
    uses
      FastMM4, // <--
      SysUtils,
      Forms,
      ...
    
  • enable the FullDebugMode option in FastMM4Options.inc

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...