Jump to content
Sign in to follow this  

FastMM5. Can't get a log file

Recommended Posts

I'm just trying out FastMM5. In version 4 I always got a log file written to disk. But I cannot persuade FastMM5 to write a log file to disk. Does anybody know how this can be achieved?

Best regards, Uwe.

Share this post

Link to post

You can call FastMM_ApplyLegacyConditionalDefines if you already have defines in your code to control logging; it will then use them.

But there is new, finer, control of the logging for FastMM5 and you can select FastMM_LogToFileEvents as you wish.  The extensive documentation in the source describes all this, and there are basic instructions about logging options at https://github.com/pleriche/FastMM5.


Someone (but perhaps not from the USA during this holiday season) will no doubt be along help with a more comprehensive answer; I mainly make do with the defaults.


Share this post

Link to post

Thank you for your answer. Unfortunately I have still problems with writing a log to disk.

In Projects / options / Delphi Compiler Conditionals I put
DEGUG and FullDebugMode

The procedure FastMM_ApplyLegacyConditionalDefines is not callable in the application, but It is called in function FastMM_Initialize in FastMM5.pas. This function is called when starting the application (which I can test with the debugger). So a log file should be written, but unfortunately it is not ..?..

The variable FastMM_LogToFileEvents  is set to a lot of events in FastMM5.pas. But I'm at a loss how to use it for persuade FastMM to write a log to disk at all ..?..

Best regards, Uwe.

Share this post

Link to post

I also have problems with logging and here is what I did to get log file.

I make FastMM5.INC in FastMM5 directory.

{$define FastMM_EnableMemoryLeakReporting}
{$define FastMM_FullDebugMode}
{$define FastMM_UseOutputDebugString}
{$define FastMM_ClearLogFileOnStartup}

{$define FastMM_EnterDebugMode}

Then, included FastMM5.INC in FastMM5.pas before interface.

unit FastMM5;
{$Include FastMM5.inc}

Now, when I add FastMM5 in some project I'm getting log file.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this