Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Pascal
  3. FastMM4-AVX

FastMM4-AVX

GPL-3.0Pascalv1.0.12

A high-performance fork of FastMM4 with AVX/AVX2/AVX512 support, efficient synchronization, and FreePascal compatibility.

GitHubGitHub
154 stars24 forks0 contributors

What is FastMM4-AVX?

FastMM4-AVX is an optimized memory manager for Delphi and FreePascal applications, designed to replace the default memory allocator with faster, more scalable performance. It enhances the original FastMM4 with support for AVX instructions and improved synchronization techniques, making it particularly effective in multi-threaded environments.

Target Audience

Delphi and FreePascal developers building high-performance, multi-threaded applications where memory allocation speed and low contention are critical.

Value Proposition

Developers choose FastMM4-AVX for its proven performance gains in multi-threaded scenarios, modern CPU feature utilization, and compatibility with both Delphi and FreePascal compilers without requiring external DLLs.

Overview

Fork of FastMM4 by Pierre le Riche with AVX/AVX2/AVX512 support, efficient synchronization, and FreePascal (FPC/Lazarus) compatibility

Use Cases

Best For

  • Multi-threaded Delphi applications requiring low-latency memory allocation
  • FreePascal/Lazarus projects needing a high-performance memory manager
  • Applications running on AVX/AVX2/AVX512-capable CPUs
  • Scenarios with high memory allocation contention across many threads
  • Replacing the default memory manager in Embarcadero Delphi projects
  • Performance-critical applications where memory copy speed is a bottleneck

Not Ideal For

  • Single-threaded applications where the advanced synchronization overhead provides no benefit over the original FastMM4
  • Legacy systems with CPUs lacking AVX/ERMS/FSRM support, as performance gains heavily depend on these modern features
  • DLL projects that require the UseReleaseStack feature, due to documented deadlock risks during unload on Windows Server 2016+
  • Projects prioritizing minimal memory overhead, as 32-byte alignment increases padding waste compared to 8-byte alignment

Pros & Cons

Pros

Multi-Threaded Performance

Benchmarks show over 50% speed improvements in high-contention scenarios, such as the NexusDB test with 64 threads running twice as fast, due to efficient pause-based spin-wait loops and optimized synchronization.

Modern CPU Optimization

Leverages AVX1/AVX2/AVX512, ERMS, and FSRM for faster memory copies, with secure register clearing via vxorps/vpxor to prevent data exposure in XMM/YMM/ZMM registers.

Cross-Compiler Compatibility

Supports Embarcadero Delphi and FreePascal/Lazarus on Win32, Win64, and Linux 64-bit, with code safety enhancements like stricter type adherence and support for compiler overflow checking.

Configurable Synchronization

Offers flexible locking via critical sections, WaitPKG instructions, or spin-waits, with compile-time options to tune for specific contention levels and avoid unnecessary bus locking.

Cons

AVX Performance Trade-Offs

AVX instructions can cause slowdowns from AVX-SSE transition penalties and reduced CPU turbo frequency, with the README admitting that benefits are negligible or negative in some cases, advising to disable AVX.

Incomplete Security Features

Safe-unlinking protection is not implemented (as noted in remaining issues), and double-free detection is only available in FullDebugMode, leaving production builds vulnerable to memory corruption attacks.

Complex Configuration

Requires managing numerous conditional defines (e.g., DisableAVX, EnableWaitPKG) and alignment settings, which can be daunting for integration and error-prone without deep understanding.

DLL Deadlock Risks

The UseReleaseStack feature must be avoided in DLLs due to deadlocks during unload, as documented in known limitations, forcing developers to compromise on performance or risk system hangs.

Frequently Asked Questions

Quick Stats

Stars154
Forks24
Contributors0
Open Issues0
Last commit3 months ago
CreatedSince 2017

Tags

#memory-management#performance-optimization#cpu-optimization#avx#lazarus#avx2#multithreading#low-level#embarcadero#delphi#freepascal#avx512#synchronization

Built With

A
AVX
A
AVX512
a
assembly
A
AVX2
D
Delphi
F
FreePascal

Included in

Pascal2.0k
Auto-fetched 16 hours ago

Related Projects

FastMMFastMM

A memory manager for Delphi and C++ Builder with powerful debugging facilities

Stars493
Forks171
Last commit3 months ago
FastMM5FastMM5

FastMM is a fast replacement memory manager for Embarcadero Delphi applications that scales well across multiple threads and CPU cores, is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.

Stars334
Forks91
Last commit1 day ago
ScaleMMScaleMM

Fast scaling memory manager for Delphi

Stars105
Forks25
Last commit4 years ago
BrainMMBrainMM

Extremely fast memory manager for Delphi

Stars99
Forks17
Last commit6 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub