Browser width is too narrow.

Rotate the screen or increase the width.
▲

Simply Memory Manager

Simply Memory Manager (SMM) is a replacement for the native memory manager for Free Pascal and Lazarus projects on Windows. SMM is free open source software.

SMM 2.2 has been released. It contains performance improvements and minor fixes.

Download Simply Memory Manager. Download failed?

If using SMM helps you, so do you. Сonsider a small donation.



Features

  • SMM prevents the "out of memory" error when cyclically allocating and freeing large amounts of memory.
  • It is faster on avalanche-like memory allocation requests.
  • SMM has a "reserved memory" feature to prevent real "out of memory" case.


How to use

Place the SimplySMM 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 SimplySMM unit from the "uses" statement.

uses
  // SimplyMM,
  .... 
        


Feel free to ask a question or report an issue.

Why Simply Memory Manager?

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 vs native


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.