Why another Memory Manager on FPC?

  • The built-in heap.inc is well written and cross-platform and cross-CPU, but its threadvar arena for small blocks tends to consume a lot of memory on multi-threaded servers, and has suboptimal allocation performance
  • C memory managers (glibc, Intel TBB, jemalloc) have a very high RAM consumption (especially Intel TBB) and panic/SIGKILL on any GPF
  • Pascal alternatives (FastMM4,ScaleMM2,BrainMM) are Windows+Delphi specific
  • It was so fun deeping into SSE2 x86_64 assembly and Pierre's insight
  • Resulting code is still easy to understand and maintain, and performs very well
  • It is really Open Source (MPL/GPL/LGPL) and may be used on production for FPC x86_64 apps just as much as FastMM4 was for Delphi

Feedback is welcome!