Questions tagged [fastmm]

FastMM is the default memory manager for Delphi Win32 and Win64 bit applications. Scales well in multi-threaded applications, not prone to memory fragmentation, and supports shared memory without the use of external .DLL files. For debugging, tools for tracking memory leaks and memory corruption are part of the FastMM manager.

FastMM is the default memory manager for Delphi Win32 and Win64 bit applications.

Written by Pierre le Riche and published under MPL 1.1 or GNU LGPL 2.1 license.

Scales well in multi-threaded applications, not prone to memory fragmentation, and supports shared memory without the use of external .DLL files. For debugging, tools for tracking memory leaks and memory corruption are part of the FastMM manager.

Resource

FastMM on SourceForge

135 questions
7
votes
1 answer

Delphi Memory Issue (FastMM4)

Working on a project which uses factories to construct objects. I keep the pointers to the factory functions in vars globally (bad I know) and register them on initialization. I recently was interested in seeing if the project had memory leaks so…
Barry
  • 1,084
  • 1
  • 8
  • 22
7
votes
4 answers

FastMM: Total Allocated Memory

How could I get the total amount of memory, that allocated by FastMM? I've tried that: function GetTotalAllocatedMemory: Cardinal; var MMState: TMemoryManagerState; begin GetMemoryManagerState(MMState); Result :=…
Roman Yankovsky
  • 1,207
  • 11
  • 23
7
votes
2 answers

How to use FastMM4 in a Delphi 6 package?

I have been using FastMM4 version 4.92 in my Delphi 6 Pro application smoothly. I now want to use it in a package I created (BPL). I tried putting the units in the Contains section and then moving them to the top of the list but I still get the…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
7
votes
1 answer

How to hide expected memory leaks in FastMM?

I have following sample application that shows the issue: program FalseMemLeak; uses ShareMem; var o: TObject; begin o := TObject.Create; // "good" leak RegisterExpectedMemoryLeak(o); TInterfacedObject.Create; // bad leak end. I am now…
Stefan Glienke
  • 20,860
  • 2
  • 48
  • 102
7
votes
1 answer

TTaskBar memory leak

Embarcadero's TTaskbar has a memory leak. Since I dropped this control on my form, FastMM reports a leak every time I close the app. I tried to mute FastMM with this code: procedure TMainForm.FormCreate(Sender: TObject); begin …
Gabriel
  • 20,797
  • 27
  • 159
  • 293
7
votes
6 answers

How to track down tricky memory leak with fastMM?

After upgrading a project from Delphi 2007 to Delphi 2009 I'm getting an Unknown memory leak, so far I've been tryin to track it down using fastMM, here is what fastMM stack trace reports: A memory block has been leaked. The size is: 20 This block…
Fabio Gomes
  • 5,914
  • 11
  • 61
  • 77
7
votes
2 answers

How to configure FastMM to detect memory leak in a dll

I can't figure out how to detect memory leaks in a statically or even dynamically linked dll. I just want to detect the leaks in the dll, and I don't want to share the memory manager between the dll, and the app. Additionally the dll is linked with…
balazs
  • 5,698
  • 7
  • 37
  • 45
7
votes
3 answers

Recommendations for Fast Multipole Method implementation?

I'm interested in implementing the Fast Multipole Method to efficiently simulate a system of repulsive particles. I've found a large collection of references discussing FMM, but none seem very approachable for non-mathematicians who want to fully…
KomodoDave
  • 7,239
  • 10
  • 60
  • 92
7
votes
4 answers

Delphi: memoryleak in IdStack, but who uses IdStack?

FAstMM reports a memoryleak from a TIdCriticalSection in IdStack.pas. I understand this is a intentional leak, that is documented in the code. What I do not understand, is why IdStack is included in my project. How can I find out what unit pulls it…
Vegar
  • 12,828
  • 16
  • 85
  • 151
6
votes
1 answer

How to free TOleStream in this bit of code

This is from a custom namespacer handler done in Delphi I use to load files into a webbrowser component. Datastream:IStream; var F: TFileStream; Dummy: INT64; begin F:=TFileStream.Create(strfilename fmOpenRead); CreateStreamOnHGlobal(0,…
Mode
  • 123
  • 2
  • 10
6
votes
3 answers

How to solve memory segmentation and force FastMM to release memory to OS?

Note: 32 bit application, which is not planned to be migrated to 64 bit. I'm working with a very memory consuming application and have pretty much optimized all the relevant paths in respect to memory allocation/de-allocation. (there are no memory…
ciuly
  • 532
  • 5
  • 13
6
votes
3 answers

Knowing where memory is being allocated using FastMM

I am trying to debug memory usage in a large application using Delphi 7. I was able to installed fastmm debug full dll and with it solve some leak problems. I also installed the memory usage tracker, allowing me to see which blocks were allocated…
wmercer
  • 1,102
  • 2
  • 11
  • 24
6
votes
4 answers

FastMM4 says "The block header has been corrupted"

I had this nasty bug that disappeared in the past but now after quite some time it returned. I have two TSam objects (derived from TPersistent) created and loaded into an TAsmJob object (derived from TObjectList). At runtime, a form creates a…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
5
votes
1 answer

FinalBuilder Server + FastMM4 example

When using FinalBuilder Server for continuous integration - what is the recommended way to run a suite of unit tests and establish a build pass/fail based on FastMM memory leak check?
Darian Miller
  • 7,808
  • 3
  • 43
  • 62
5
votes
3 answers

Is it possible that FastMM is wrongly reporting an access violation?

I have a complex application that works as expected when compiled normally, but closing a form generates an access violation when compiled using FastMM 4.97 (the latest). The AV occurs when the message dispatching attempts to handle a message meant…
Larry Hengen
  • 411
  • 2
  • 5
  • 10
1
2
3
8 9