Skip to content
/ fastmm Public

FastMM is a lightning fast replacement memory manager for Embarcadero Delphi Win32 and Win64 applications that is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.

Notifications You must be signed in to change notification settings

kevind7/fastmm

Repository files navigation

Snapshot into Github of fastmm project from SourceForge. This is not kept up-to-date so please refer back to original.

README taken from the Source Code comments.

Fast Memory Manager 4.991

Description: A fast replacement memory manager for Embarcadero Delphi Win32 applications that scales well under multi-threaded usage, is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.

Homepage: http:https://fastmm.sourceforge.net

Advantages:

  • Fast
  • Low overhead. FastMM is designed for an average of 5% and maximum of 10% overhead per block.
  • Supports up to 3GB of user mode address space under Windows 32-bit and 4GB under Windows 64-bit. Add the "$SetPEFlags $20" option (in curly braces) to your .dpr to enable this.
  • Highly aligned memory blocks. Can be configured for either 8-byte or 16-byte alignment.
  • Good scaling under multi-threaded applications
  • Intelligent reallocations. Avoids slow memory move operations through not performing unneccesary downsizes and by having a minimum percentage block size growth factor when an in-place block upsize is not possible.
  • Resistant to address space fragmentation
  • No external DLL required when sharing memory between the application and external libraries (provided both use this memory manager)
  • Optionally reports memory leaks on program shutdown. (This check can be set to be performed only if Delphi is currently running on the machine, so end users won't be bothered by the error message.)
  • Supports Delphi 4 (or later), C++ Builder 4 (or later), Kylix 3.

Usage: Delphi: Place this unit as the very first unit under the "uses" section in your project's .dpr file. When sharing memory between an application and a DLL (e.g. when passing a long string or dynamic array to a DLL function), both the main application and the DLL must be compiled using this memory manager (with the required conditional defines set). There are some conditional defines (inside FastMM4Options.inc) that may be used to tweak the memory manager. To enable support for a user mode address space greater than 2GB you will have to use the EditBin* tool to set the LARGE_ADDRESS_AWARE flag in the EXE header. This informs Windows x64 or Windows 32-bit (with the /3GB option set) that the application supports an address space larger than 2GB (up to 4GB). In Delphi 6 and later you can also specify this flag through the compiler directive {$SetPEFlags $20} *The EditBin tool ships with the MS Visual C compiler. C++ Builder 6: Refer to the instructions inside FastMM4BCB.cpp.

License: This work is copyright Professional Software Development / Pierre le Riche. It is released under a dual license, and you may choose to use it under either the Mozilla Public License 1.1 (MPL 1.1, available from http:https://www.mozilla.org/MPL/MPL-1.1.html) or the GNU Lesser General Public License 2.1 (LGPL 2.1, available from http:https://www.opensource.org/licenses/lgpl-license.php). If you find FastMM useful or you would like to support further development, a donation would be much appreciated. My banking details are: Country: South Africa Bank: ABSA Bank Ltd Branch: Somerset West Branch Code: 334-712 Account Name: PSD (Distribution) Account No.: 4041827693 Swift Code: ABSAZAJJ My PayPal account is: [email protected]

Contact Details: My contact details are shown below if you would like to get in touch with me. If you use this memory manager I would like to hear from you: please e-mail me your comments - good and bad. Snailmail: PO Box 2514 Somerset West 7129 South Africa E-mail: [email protected]

Support: If you have trouble using FastMM, you are welcome to drop me an e-mail at the address above, or you may post your questions in the BASM newsgroup on the Embarcadero news server (which is where I hang out quite frequently).

Disclaimer: FastMM has been tested extensively with both single and multithreaded applications on various hardware platforms, but unfortunately I am not in a position to make any guarantees. Use it at your own risk.

About

FastMM is a lightning fast replacement memory manager for Embarcadero Delphi Win32 and Win64 applications that is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published