# microsoft/snmalloc

Message passing based allocator

Repository: https://github.com/microsoft/snmalloc
Canonical: https://ross.abutalabs.com/products/snmalloc
Language: C++
License: MIT
License Family: permissive
Topics: allocator, malloc, memory-allocator
Last push: 2026-08-26T11:25:59+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 77, longevity 100
- inputs: {"age_days": 2793, "days_push": 7, "days_rel": 72, "gap_med": 90, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1961, forks 134 (observed 2026-08-28T04:05:59.445490+00:00)

## What it is
snmalloc is a high-performance, message-passing based memory allocator from Microsoft, usable as a header-only C++ library, via LD_PRELOAD, or from Rust. It excels at cross-thread deallocation and batched frees with lock-free remote deallocation and an optional hardened build with allocation randomisation and metadata protection.

## Use cases
- replace glibc malloc with a faster allocator
- speed up multithreaded apps that free memory on other threads
- reduce allocator contention on many-core servers
- use a hardened allocator against heap corruption exploits
- use snmalloc from Rust via the snmalloc-rs crate
- LD_PRELOAD an allocator without recompiling

## When to choose
- workloads with cross-thread deallocation or large batch frees
- many-core applications needing scalable allocation
- security-sensitive apps wanting hardened heap features
- you want a drop-in malloc replacement or header-only C++ integration

## When to avoid
- tiny single-threaded programs where allocator choice barely matters
- platforms without supported backend abstractions
- you need allocator features like full heap profiling or GC integration

## Facets
- artifact type: library
- maturity: active
- function: caching, concurrency, developer-tools
- domain: performance, developer-tools, microservices
- platform: windows, cpp, rust, cross-platform
- tags: memory-allocator, malloc, message-passing, header-only, hardened-allocator, ld-preload, linux, macos

## Member repositories
- microsoft/snmalloc (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:59.445490+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-30T03:05:39.085590+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/snmalloc (fetched 2026-08-28T04:05:59.445490+00:00, sha 3efacbb3c88c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
