How to get a stack trace from FastMM

后端 未结 4 1307
栀梦
栀梦 2020-12-05 05:44

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 m

4条回答
  •  囚心锁ツ
    2020-12-05 05:55

    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

提交回复
热议问题