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.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.