Friday, May 18, 2007

Use the full FastMM! Consider donating!

A few years ago, it would be interesting to ask what memory manager (MM) you are using in your Delphi projects. You had the old-in-the-tooth in-the-box 32-bit Delphi RTM MM that was the default MM in Delphi 2 through Delphi 7, simple wrappers around Win32 API HeapAlloc, freeware alternatives such as MultiMM, RecyclerMM, PSD, AAHpDeFr, Bucket, and commercial alternatives such as SmartHeap, Nexus MM and BigBrain.

The winner takes it all

Then (after many rounds in the FastCode newsgroups), Pierre le Riche's FastMM appeared as the winner - it is the best memory manager overall. It is a tricky balancing act of trying to achieve high performance, low memory usage, low fragmentation, good multi-thread performance, good multi-processor performance, and working well with all kinds of application behavior profiles. Batch programs, services, GUI programs, databases and web servers all have very different memory usage needs - a good memory manager needs to work well with all of them.

In most cases FastMM will be the best solution - and if not the best, it will be very close. As you know by now FastMM4 is the default MM in both Delphi 2006 and Delphi 2007. That is, it is a slightly reduced version that does not have the extended debug features that is available in the full version that you can download for free here. With the right defines in the file you can get full stack trace for memory leaks, detection of heap corruption, using freed blocks, calling virtual methods of freed objects, double frees and so on. If you are serious about finding and fixing problems in your projects early, you should use the full version with the debug options turned on during development and alpha testing.


We have been doing so for some time for our own products now - that's why I decided it was about time to give a little token of our appreciation back to Pierre. We used  the FastMM donation page on SourceForge to donate a symbolic amount - it is by no means proportional to the benefit we get from FastMM or the amount of work Pierre has put down, but hopefully it gives Pierre a good feeling ;).

I encourage each one of you to consider to do the same - at least after you have started to use FastMM and see the major benefits it gives.

You can make your donation here.


Anonymous said...

I wonder why Borland/Codegear didn't integrate FastMM better in Delphi - giving it a whole page in the project options where to set many of its features.
Once more it's that "Borland unfinishing" that started in Delphi 3 and still continues - new feature are introduces but never exploited fully (Midas, to name one) and never really polished.
Once introduced a new buzzword gets the stage and the old one is left behind in whatever development stage it is.

Anonymous said...

Son, I don't use the full version of FastMM. Also, I don't think that this was a big deal, speaking of money. But, in my very humble opinion, this is one of the best blog posts. Ever. It's all about being human.

Just letting you know...

Anonymous said...

Delphi 2007 use FastMM as default MM. I want to use some functionalty / options from Can I include FastMM4 unit to Delphi 2007 project?

Hallvards New Blog said...

> Can I include FastMM4 unit to Delphi 2007 project

Yes, you can - we do that all the time.

Copyright © 2004-2007 by Hallvard Vassbotn