fastmm

How to get a stack trace from FastMM

喜夏-厌秋 提交于 2019-12-17 15:44:09
问题 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? 回答1: The internal Delphi version of FastMM doesn't support stack traces. If you want to log the memory leak stack

Using FastMM4, how to register leaked string?

感情迁移 提交于 2019-12-13 01:03:08
问题 With FastMM4 one can easily register a leaked pointer, but not a leaked string. Apparently the @ operator applied to a string is not really giving us the whole string, nor is PChar(string) ; What can I use to nicely register a leaked string? For now I found this works: FastMM4.RegisterExpectedMemoryLeak(Pointer(NativeInt(PChar(StringVariable))-12)); But it relies on the magic number 12 , and that's version-dependent, and the code really doesn't express what's going on. I hope there's a RTL

TXMLDocument.Active := False causes FastMM4 errormessage “FastMM detected that a block has been modified after being freed”

半城伤御伤魂 提交于 2019-12-12 19:21:27
问题 we have a strange effect using Delphi XE8 with FastMM4 (Version 4.992) in FullDebugMode. To reproduce the effect, just create a new TForm application, put FastMM4 in the first line of the DPR file, put a Button on the Form and put the following code in the clickhandler: (You need to have FastMM 4 installed, FullDebugMode must be enabled in the FastMM4Options.inc file and the FullDebugMode.dll has to be in the output folder of your programm!) procedure TForm3.Button4Click(Sender: TObject); var

FastMM4, how to read the log file?

别等时光非礼了梦想. 提交于 2019-12-12 15:01:11
问题 i'am working on an software,so i have just started using FastMM4 (for real) in my project. i have found on the net on about how to get the line number in FastMM4,i got the line number but i can figure out what does the other information in the log means? i have this in the log file This block was allocated by thread 0x15F8, and the stack trace (return addresses) at the time was: 402E86 [system.pas][System][System.@GetMem][2648] 403A3B [system.pas][System][System.TObject.NewInstance][8824]

Delphi 7, DUnit and FastMM reporting Strings incorrectly

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 14:48:59
问题 I'm using DUnit and FastMM to catch unfinalized memory blocks but there seems to be a Bug. I dunno if its in FastMM, DUnit or in Delphi itself, but here goes: When my Test Case has internal strings, the test fails with memory leaks. If I run the same test again without closing the DUnit GUI, the test passes OK. The same occours with DUnit GUI Testing, I believe for the same reason. There are no Leaks in my app, the proof is that FastMM doesn't generate the leak report in those cases. Question

Occasional access violation in FastMM4, DebugGetMem

允我心安 提交于 2019-12-10 02:39:52
问题 I'm trying to track down an access violation. Reproducibility seems non-deterministic, and rare, so I want to check a few of my assumptions before I go any further. The access violation is raised in FastMM4, version 4.991, in the function DebugGetMem , in the following code: if (ASize > (MaximumMediumBlockSize - BlockHeaderSize - FullDebugBlockOverhead)) or CheckFreeBlockUnmodified(Result, GetAvailableSpaceInBlock(Result) + BlockHeaderSize, boGetMem) then begin {Set the allocation call stack}

How can I enable the memory leak tracking with FastMM in DUnit?

主宰稳场 提交于 2019-12-06 18:40:44
问题 In the GUI test runner, the menu items for memory leak checking are inactive (grayed out). Is there a special switch I have not found yet to activate them? Using DUnit 9.4 (from Delphi 2009 or from the sourceforge Subversion repository) and FastMM4.92 回答1: You have to build your DUnit GUI-testrunner with the FASTMM and ManualLeakReportingControl directive. This will enable the memoryleak items (Take a look in GUITestRunner.pas). 来源: https://stackoverflow.com/questions/685904/how-can-i-enable

FreeMM vs ShareMem

送分小仙女□ 提交于 2019-12-06 04:45:38
问题 We have a lot of dll-libraries written in both delphi and c++ builder, and use sharemem and borlndmm.dll. An aligment-issue in a 3thparty library forces us over to the new memorymanager in delphi 2007. Can someone please explain 'shared memory manager' for me? Is SimpleShareMem a dropin replacement for ShareMem ? Can we then stop deploying borlndmm.dll? Do we have to do something with the c++-libraries as well? Can some libraries use ShareMem and some SimpleShareMem? Thanks, -Vegar 回答1: I

What could explain the difference in memory usage reported by FastMM or GetProcessMemoryInfo?

前提是你 提交于 2019-12-06 00:22:00
My Delphi XE application is based on a single EXE using a local server DLL created by RemObjects and uses a lot of memory for a specific operation until it generates an exception saying there are not enough memory. So I'm trying to understand why and where this is happening so I placed various steps throughout my code where I report on memory usage. The problem is that I'm getting very different information based on the method used to get memory usage information: If I use the method explained here which asks FastMM directly for both the Client EXE and Server DLL, here is what I get: STEP 1:

Occasional access violation in FastMM4, DebugGetMem

拟墨画扇 提交于 2019-12-05 01:19:45
I'm trying to track down an access violation. Reproducibility seems non-deterministic, and rare, so I want to check a few of my assumptions before I go any further. The access violation is raised in FastMM4, version 4.991, in the function DebugGetMem , in the following code: if (ASize > (MaximumMediumBlockSize - BlockHeaderSize - FullDebugBlockOverhead)) or CheckFreeBlockUnmodified(Result, GetAvailableSpaceInBlock(Result) + BlockHeaderSize, boGetMem) then begin {Set the allocation call stack} GetStackTrace(@PFullDebugBlockHeader(Result).AllocationStackTrace, StackTraceDepth, 1); {Set the