# microsoft/mimalloc

mimalloc is a compact general purpose allocator with excellent performance.

Repository: https://github.com/microsoft/mimalloc
Canonical: https://ross.abutalabs.com/products/mimalloc
Homepage: https://microsoft.github.io/mimalloc
Language: C
License: MIT
License Family: permissive
Last push: 2026-08-22T10:49:34+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 2632, "days_push": 11, "days_rel": 14, "gap_med": 9, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 13332, forks 1165 (observed 2026-08-28T04:11:03.150338+00:00)

## What it is
mimalloc is a compact general-purpose memory allocator developed by Microsoft, serving as a drop-in replacement for malloc with excellent performance characteristics. It uses free list sharding techniques to reduce fragmentation and improve locality, and can be dynamically linked into existing programs without code changes.

## Use cases
- replace malloc in C/C++ programs for better performance
- reduce memory fragmentation in long-running services
- speed up allocation-heavy workloads
- override the system allocator via LD_PRELOAD without recompiling
- integrate a small allocator into a language runtime
- achieve bounded worst-case latency for allocation

## When to choose
- you need a fast, drop-in malloc replacement with minimal code changes
- your application suffers from allocator contention in multithreaded workloads
- you want a small (~10k LOC), portable allocator that is easy to embed in runtimes
- you need excellent worst-case latencies for large-scale services

## When to avoid
- you need garbage collection or language-level memory management rather than a malloc replacement
- your platform is not among the supported ports (Windows, macOS, Linux, BSD, WASM, etc.)
- you require specialized allocators like real-time or GPU allocators
- you want a header-only allocator with zero compiled dependencies

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools, performance, operating-systems
- platform: windows, wasm, cpp, c, cross-platform
- tags: malloc-replacement, memory-allocator, drop-in, runtime-systems, low-latency, memory-allocation, performance, linux, macos

## Member repositories
- microsoft/mimalloc (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:03.150338+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:21.449561+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/mimalloc (fetched 2026-08-28T04:11:03.150338+00:00, sha 1de72ad44c85)
  - homepage: https://microsoft.github.io/mimalloc (fetched 2026-08-29T08:08:18.196396+00:00, sha b09eab2cbc8d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
