A drop-in malloc replacement that automatically reduces memory fragmentation in C/C++ applications without code changes.
Mesh is a memory allocator that automatically reduces memory fragmentation in C/C++ applications. It serves as a drop-in replacement for malloc that can transparently compact memory without requiring any changes to application code, addressing the long-standing problem of memory fragmentation in long-running programs.
C/C++ developers and system programmers working on applications that suffer from memory fragmentation issues, particularly those running on Linux or macOS systems who want automatic memory optimization without code modifications.
Developers choose Mesh because it provides automatic memory compaction capabilities unavailable in standard allocators, requires zero code changes through its drop-in replacement approach, and integrates transparently via LD_PRELOAD while maintaining performance through its novel architecture.
A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Automatically compacts memory to reduce fragmentation without any code changes, as shown in the Redis example where it meshed over 100 MB.
Serves as a direct malloc replacement via LD_PRELOAD or linking, allowing seamless use with existing C/C++ applications like git.
Requires only libc at runtime with no additional dependencies, making deployment lightweight and straightforward.
Provides statistics via the MALLOCSTATS environment variable to track compaction effectiveness, such as meshed MB and allocation counts.
Windows support is still a work in progress, limiting Mesh to Linux and macOS environments only.
Not all workloads experience fragmentation, so Mesh may have minimal impact on some applications, as admitted in the README.
Relies on Bazel wrapped in a Makefile, which can add setup overhead compared to simpler build systems like CMake or plain Make.
mimalloc is a compact general purpose allocator with excellent performance.
General purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. [BSD] website
TCMalloc is Google's customized implementation of C's `malloc()` and C++'s `operator new` for memory allocation within C and C++ code. It provides a high-performance alternative to standard memory allocators, optimized for multi-threaded applications where allocation speed and scalability are critical. ## Key Features - **Fast Allocation** — Optimized for speed with efficient memory management algorithms - **Multi-threaded Performance** — Designed to scale well in concurrent environments - **Customizable Configuration** — Tunable parameters for different workload requirements - **Comprehensive API** — Full support for C and C++ memory allocation interfaces - **Platform Support** — Available across multiple operating systems and architectures ## Philosophy TCMalloc prioritizes performance and scalability in multi-threaded environments while maintaining compatibility with standard memory allocation interfaces, making it suitable for production systems with demanding memory allocation patterns.
The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.