Simply Memory Manager (SMM) is free and open source software to replace the native memory manager for Free Pascal and Lazarus projects on Windows.
The latest release is SMM 2.2.
Download Simply Memory Manager.
Please consider to keep the project going.
Download failed?
How to use
Place the SimplyMM unit the first in the "uses" statement.
uses
SimplyMM,
....
SMM and memory leaks tracing
Do not use the SMM when heap trace manager (HeapTrc) is active. In such cases, exclude the SimplyMM unit from the "uses" statement.
uses
// SimplyMM,
....
Feel free to
ask a question or report an issue.
Simply Memory Manager is an open source software; you can use it or redistribute under the terms of the End-User License Agreement.
Why Simply Memory Manager?
Benefits
-
It prevents the "out of memory" error that occurs in the native Free Pascal memory manager on Windows when cyclically allocating and freeing large amounts of memory.
-
It is faster on avalanche-like memory allocation requests.
-
It has a reserved memory feature to prevent a real "out of memory" situation.
In some cases, it is necessary to repeatedly get and free a large amount of memory.
For example, it can be editing graphic files, copying a large number of files and, of course, simulation large and complex systems.
In the latter case, multiple reuse of the maximum amount of available memory is required.
Free Pascal's native memory manager uses certain Windows functions for memory allocation and freeing
that cause fatal errors when large amounts of memory are repeatedly reused.
In addition, it runs in this case rather slowly.
SMM prevents such errors by using a different approach, and it is much faster on avalanche-like memory allocation requests.
SMM demonstrates enough good performance both for single- and multi-thread tasks but in some cases, SMM may be a bit slower than the native memory manager.
This is due to the fact that when using Lazarus IDE, some memory blocks were already allocated, even when the SMM was the first unit in the "uses" statement.
Therefore, the SMM must also recognize and process requests to free and reallocate memory blocks already allocated by the native memory manager.
This additional processing can reduce performance somewhat.
The slowdown might probably be noticeable in some cases in the GUI due to the constant redrawing of graphical controls that use memory reallocation.