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

127 questions
103
votes
1 answer

Is there a way to programmatically tell if particular block of memory was not freed by FastMM?

I am trying to detect if a block of memory was not freed. Of course, the manager tells me that by dialog box or log file, but what if I would like to store results in a database? For example I would like to have in a database table a names of…
Wodzu
  • 6,705
  • 8
  • 57
  • 99
49
votes
6 answers

How to get the Memory Used by a Delphi Program

I know how to get the System memory use using GlobalMemoryStatusEx, but that tells me the what the entire OS is using. I really want my program to report how much memory it alone has allocated and is using. Is there any way within my Delphi 2009…
lkessler
  • 19,414
  • 31
  • 125
  • 196
20
votes
1 answer

How to obtain the names of custom-made structures whose instances have leaked memory?

I am working a on parser which will go through a FASTMM4 memory leak report and store all relevant data in a custom-made structure/class. I use VirtualTreeView to display each class that has leaked instances as a node in the tree. The tree - Notice…
programstinator
  • 1,314
  • 3
  • 10
  • 30
19
votes
4 answers

How to get a stack trace from FastMM

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…
Jamie
  • 3,130
  • 2
  • 23
  • 35
16
votes
1 answer

How to enable full debug mode in FastMM4?

I cannot figure out how to use FastMM. I have downloaded it from SourceForge and placed FastMM4Messages.pas and FastMM4.pas at the top of my dpr file. I now call this procedure to leak some memory: procedure testMemoryFastMM; var str :…
PresleyDias
  • 3,481
  • 5
  • 33
  • 60
13
votes
1 answer

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

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…
mjn
  • 35,561
  • 24
  • 160
  • 351
12
votes
2 answers

Delphi XE2: Does FastMM work with Win64 application?

I use FastMM in my Delphi application to trace memory leaking especially in FullDebugMode. With the new release of Delphi XE2, can we use FastMM as the memory manager? Can FastMM work with the Win64 platform?
Chau Chee Yang
  • 15,982
  • 13
  • 62
  • 126
12
votes
4 answers

Why does my Delphi program's memory continue to grow?

I am using Delphi 2009 which has the FastMM4 memory manager built into it. My program reads in and processes a large dataset. All memory is freed correctly whenever I clear the dataset or exit the program. It has no memory leaks at all. Using the…
lkessler
  • 19,414
  • 31
  • 125
  • 196
11
votes
2 answers

GetThreadID in assembly

I read the source code of FastMM4, and notice this interesting function function GetThreadID: Cardinal; {$ifdef 32Bit} asm mov eax, FS:[$24] end; {$else} begin Result := GetCurrentThreadID; end; {$endif} I've tested it, and it works, so my…
doctorlai
  • 5,223
  • 3
  • 31
  • 66
10
votes
8 answers

Why the Excess Memory for Strings in Delphi?

I'm reading in a large text file with 1.4 million lines that is 24 MB in size (average 17 characters a line). I'm using Delphi 2009 and the file is ANSI but gets converted to Unicode upon reading, so fairly you can say the text once converted is 48…
lkessler
  • 19,414
  • 31
  • 125
  • 196
10
votes
1 answer

Occasional access violation in FastMM4, DebugGetMem

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…
Ian Goldby
  • 4,428
  • 36
  • 71
10
votes
2 answers

Getting a longer stacktrace from FastMM?

When FastMM logs a memory leak it includes a stacktrace going back 9 calls. Problem is that the stacktrace is too general to locate the problem easily. The last function call in the trace is called at least 50 times and the object leaked is a very…
The_Fox
  • 6,834
  • 2
  • 38
  • 66
8
votes
5 answers

Is there, besides hunting for memory leaks, another situation where I should free all objects when destroying an application?

Suppose an application with some forms and only one data module are created at start. In the DM1.OnCreate event, a TStringList is created to be used at runtime. We know that when the application is being terminated, all things will be destroyed and…
EMBarbosa
  • 1,462
  • 1
  • 23
  • 68
8
votes
5 answers

Possible obscure causes for Abstract Error in Delphi?

In a Delphi 7 project we installed FastMM. Soon after that we noticed one of the forms started to issue Abstract Error message on close. I have debugged this extensively and I can't find the reason so far. The usual reason for this error message…
Escape Velocity
  • 589
  • 1
  • 6
  • 20
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,064
  • 1
  • 7
  • 21
1
2 3
8 9