mimalloc: A new, high-performance, scalable memory allocator for the modern era

| Source: Microsoft Research Blog

Tags: mimalloc, memory allocator, Microsoft Research, Python, CPython, performance, infrastructure

Microsoft Research published a detailed overview of mimalloc, their open-source high-performance memory allocator that now ships as the default allocator for NoGIL CPython 3.13+, Unreal Engine, and games including Death Stranding — with its Rust wrapper seeing 100K+ downloads per day.

Details

mimalloc is an open-source drop-in replacement for malloc/free developed at Microsoft Research's RiSE group. Originally built for the Lean and Koka programming languages in 2020, its design — bounded worst-case allocation times, low internal fragmentation, minimal contention via atomic operations — proved effective at Microsoft's service scale, improving response times in Bing. The allocator is now widely deployed: it serves as the allocator for NoGIL CPython 3.13+, is integrated into Unreal Engine, and is used in Death Stranding. Its Rust wrapper sees over 100K downloads per day. The codebase is compact (~12K lines of C) with clear internal data structures and strong invariants, making it easier to reason about than many industry allocators. It handles a wide range of scenarios from small-scale applications to services with 500+ GiB memory footprints and hundreds of threads. The MSR post provides context on the design philosophy and deployment history rather than announcing a new version. For developers working on high-throughput AI serving infrastructure, LLM inference engines, or any memory-intensive C/C++ system, mimalloc is a well-validated drop-in with significant real-world deployment behind it.