FastMM4 internals
To get full speed out of anything, you have to understand how it works, and memory managers are no exception to this rule. To write very fast Delphi applications, you should therefore understand how Delphi’s default memory manager works.
FastMM4 is not just a memory manager—it is three memory managers in one! It contains three significantly different subsystems— a small block allocator, a medium block allocator, and a large block allocator.
The first one, the allocator for small blocks, handles all memory blocks smaller than 2.5 KB. This boundary was determined by observing existing applications. As it turned out, in most Delphi applications, this covers 99% of all memory allocations. This is not surprising, as in most Delphi applications most memory is allocated when an application creates and destroys objects and works with arrays and strings, and those are rarely larger than a few hundred characters.
Next comes the allocator for medium...