# mjansson/rpmalloc

Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

Repository: https://github.com/mjansson/rpmalloc
Canonical: https://ross.abutalabs.com/products/rpmalloc
Language: C
License: MIT
License Family: permissive
Topics: concurrency, thread, memory, allocator
Last push: 2026-07-15T14:54:06+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 92, release rhythm 93, longevity 100
- inputs: {"age_days": 3575, "days_push": 49, "days_rel": 49, "gap_med": 5, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2498, forks 211 (observed 2026-08-28T04:06:56.809852+00:00)

## What it is
rpmalloc is a public domain cross-platform lock-free thread-caching memory allocator implemented in a single ~3300-line C source file with 16-byte alignment. It aims to outperform popular allocators like tcmalloc, hoard, and ptmalloc3 with low memory overhead.

## Use cases
- replace malloc with a faster allocator in a C/C++ application
- reduce allocation contention in multithreaded programs
- drop a single-file allocator into a game engine or performance-critical codebase
- benchmark my allocator against tcmalloc and mimalloc
- customize the memory mapping backend for an embedded or custom platform

## When to choose
- you need a fast, low-overhead allocator with minimal integration effort
- you want permissive licensing (public domain / MIT)
- your workload is multithreaded with frequent small allocations
- you want a small, readable codebase you can modify

## When to avoid
- you need garbage collection or heap debugging/leak-detection features
- you rely on allocator-specific extensions like jemalloc's profiling APIs
- your platform lacks atomic operations or an mmap-style virtual memory API

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, developer-tools
- domain: performance, developer-tools, cross-platform
- platform: windows, cpp, c
- tags: memory-allocator, lock-free, thread-caching, public-domain, single-file, linux, macos, ios, android

## Member repositories
- mjansson/rpmalloc (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:56.809852+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-30T02:27:03.014886+00:00, confidence not recorded.
  - readme: https://github.com/mjansson/rpmalloc (fetched 2026-08-28T04:06:56.809852+00:00, sha c76320c36e7c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
