The good, the bad, and the leaky: jemalloc, bumpalo, and mimalloc in Meilisearch
Mar 30, 2026Clément Renault

Summary
This post details the investigation and resolution of memory leaks in Meilisearch, primarily focusing on the interaction between different memory allocators (jemalloc, mimalloc, bumpalo) and the LMDB dependency. It highlights a leak related to `bumpalo::Vec::into_bump_slice` and a more significant issue stemming from the non-cooperation of LMDB's system allocator with Meilisearch's custom global allocator (mimalloc). The solution involved unifying the allocator by using jemalloc and later mimalloc v3 with its override feature, leading to significant memory usage reduction and performance improvements.
More from the Sharding and Replication trail
- How to diagnose search performance problems in B2B SaaS
- CarJager: Millions of Vehicle Searches on Meilisearch
- Meilisearch Launch Week April 2026 recap: everything that shipped
- Scale without limits: introducing sharding & replication in Meilisearch Cloud
- How Touchless powers instant, scalable vehicle search for large dealer groups