Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does FastMM4 compatible configuration work #10

Open
nz-markk opened this issue Jul 13, 2020 · 4 comments
Open

Does FastMM4 compatible configuration work #10

nz-markk opened this issue Jul 13, 2020 · 4 comments

Comments

@nz-markk
Copy link

From what I read I thought the FastMM4 defines would work with FastMM5. I've just tried switching from 4 to 5 to compare speed during debug but am no longer getting a detailed leak log file (or any log file) with FastMM4Options.inc in the runtime folder or if I add a {$include FastMM4Options.inc} to the dpr

I did manage to get leak detail logging working by adding mmetUnexpectedMemoryLeakDetail to FastMM_LogToFileEvents
which showed that logging could work and the options file was not working as the other settings in it, eg file delete on start, were not working

Is there something extra I need to do?

@pleriche
Copy link
Owner

Hi Mark,

FastMM5 does not use the FastMM4Options.inc file, since the {$include} directive would raise a compiler error if the file was not present (which is usually the case). In order to use the v4 defines you have to specify them in Project Options -> Compiling -> Conditional Defines.

Including the file in the DPR won't help, since the scope of the defines would then be local to the DPR.

Not all the v4 conditional defines are supported, only the most useful ones that still apply to v5. If you spot a v4 defines that you deem critical that are missing, please let me know.

Best regards,
Pierre

@nz-markk
Copy link
Author

Ah yes I'm a doofus, mixing up my C++/Delphi include files and scoping!!!!

I'll fix that and try them out.

Cheers
Mark

@nz-markk
Copy link
Author

Here's the first one I noticed missing, ClearLogFileOnStartup

Fixed by adding the following to FastMM_ApplyLegacyConditionalDefines
{$ifdef ClearLogFileOnStartup} FastMM_DeleteEventLogFile(); {$endif}

@pleriche
Copy link
Owner

Here's the first one I noticed missing, ClearLogFileOnStartup

Thanks, I've pushed a fix for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants