Reputation: 75
I am using RAD Studio 10.2.3.
I am trying to use FastMM4 to find memory leaks in my C++Builder 64-bit application.
So I downloaded FastMM4. I have the latest version 4.993.
The problem is that some part of the code are a little bit obsolete and need to be adjusted.
For example, I needed to recompile FastMM_FullDebugMode.dll
. It is OK for this one because the source code is included.
The problem is that the DLL works with a .lib
file, which unfortunately is for a 32-bit application.
I tried anyway, but I am getting the error message below:
[ilink64 Error] Fatal: Invalid object file 'FASTMM_FULLDEBUGMODE.LIB'
I am pretty sure it is because I need a 64-bit library, which is .a
(not .lib
).
So, I tried to find FastMM_FullDebugMode.lib
source code to recompile for a 64-bit application. But I cannot find it on GitHub.
Does somebody know where I can find and download that source code?
I confirm that the library file issue is resolved! But I am running into another one. I am getting the following popup error message:
"FastMM4 cannot install since memory has already been allocated through the default memory manager. FastMM4.pas MUST be the first unit in your project's dpr file."
I am sure that I followed all the steps. In my project "Options > Build order" I put FastMM4Messages,pas first, then FastMM4.pas as written in the documentation. I also added: USEOBJ("FastMM4BCB.cpp"); in my project main file
So, how to fix this error?
After verification, I have to conclude that FastMM$ cannot work with C++ Builder 10.2. I don't know it can either work with previous versions of C++ Builder. I noticed some functions which are used in FastMM4 and cannot work with C++ Builder:
IsMemoryManagerSet is always true in C++ Builder https://docwiki.embarcadero.com/Libraries/Tokyo/en/System.IsMemoryManagerSet
GetHeapStatus is deprecated https://docwiki.embarcadero.com/Libraries/Tokyo/en/System.GetHeapStatus
I tried to replace IsMemoryManagerSet by a local variable and GetHeapStatus by GetMemoryManagerState, but that did not resolve the issue. Cannot have FastMM4 work.
So, most simple solution: Does anybody know another free memory leaks detection application I can use in C++ Builder 10.2.3? Something which really works?
Upvotes: 0
Views: 167