SYSTEM Cited by 3 sources
jemalloc¶
jemalloc is an open-source general-purpose memory allocator emphasising fragmentation avoidance and scalable concurrency support on multi-core systems. Originally developed by Jason Evans for FreeBSD (2005); adopted inside Facebook / Meta as the Facebook-era standard allocator and maintained by Meta upstream at github.com/jemalloc/jemalloc.
Alongside the Linux kernel and the compilers, jemalloc sits in the tier-0 foundational-software layer of Meta's stack — adapting over time to changes in underlying hardware + upper-layer software, and delivering long-term infrastructure benefits precisely because it's load-bearing everywhere (Source: sources/2026-03-02-meta-investing-in-infrastructure-jemalloc-renewed-commitment).
Beyond allocator performance, jemalloc ships a rich memory-profiling
API that emits per-allocation + per-thread statistics and heap
profiles compatible with pprof.
Size-class bins at scale¶
jemalloc groups allocations of similar sizes into fixed-size size-class bins, serving each request from the smallest bin that fits and wasting the gap (internal fragmentation). This is normally invisible, but at extreme allocation counts the per-allocation rounding tax compounds into real memory.
Cloudflare's Big Pineapple resolver — Rust, using
jemalloc — hit exactly this at 250 billion DNS cache entries: boxing
each DNS record individually meant each record paid a size-class rounding
tax (an MX record's 40-byte request rounds up to a 48-byte bin, wasting 8).
The fix was to stop making many small allocations and instead pack all of an
entry's records into a single contiguous Box<[u8]>
(records-in-wire-format-in-cache), paying the rounding tax once
per entry and restoring cache locality (Source:
sources/2026-08-27-cloudflare-how-we-saved-100-terabytes-of-memory-by-optimizing-1111s-dns).
This is the wiki's canonical illustration of how jemalloc's bin structure
shapes a consumer's data-structure design.
Stewardship history¶
- 2005 — Jason Evans creates jemalloc for FreeBSD.
- Facebook-era adoption — jemalloc becomes the standard allocator across Meta's server stack.
- 2024 —
github.com/jemalloc/jemallocarchived on GitHub. Visible external signal of the stewardship drift Meta later acknowledges. - 2026-03-02 — Meta publishes its renewed commitment: acknowledges "a gradual shift away from the core engineering principles that have long guided jemalloc's development", meets with the community including founder Jason Evans, unarchives the repository, publishes a four-axis technical roadmap. Canonical wiki instance of stewardship-reset-for-foundational-oss.
2026 roadmap (from Meta's renewed-commitment post)¶
Meta's forward-looking investment areas:
- Technical debt reduction — refactoring + modernising the codebase to ensure jemalloc "remains efficient, reliable and easy to use for all users."
- Huge-page allocator (HPA) improvements — better utilisation of transparent huge pages (THP) for CPU efficiency. TLB-miss reduction at scale is the underlying mechanism; the engineering challenge is keeping fragmentation bounded while feeding the kernel's THP promotion with appropriately-aligned long-lived ranges.
- Memory efficiency — improvements to packing, caching, and purging mechanisms (the three load-bearing knobs of a general-purpose allocator).
- AArch64 (ARM64) out-of-box performance — consistent with Meta's multi-ISA posture from DCPerf and the broader industry shift to ARM datacenter servers.
No shipping dates, scope details, or perf targets disclosed in the announcement.
Role on this wiki¶
- Tier-0 foundational allocator in Meta's stack — the memory- allocator axis of Meta's kernel + compilers + allocator foundational-software lineage.
- Memory-profiler backend inside Meta's Strobelight orchestrator — the 2025-01-21 Strobelight post names it explicitly: "Memory profilers powered by jemalloc."
- Canonical example of the tier-0 OSS stewardship posture: open-source the load-bearing component and resist the short-term-benefit temptation that high leverage creates.
Seen in¶
- sources/2026-03-02-meta-investing-in-infrastructure-jemalloc-renewed-commitment — canonical primary source. Stewardship reset, four-axis roadmap, tier-0-foundational-software framing alongside the Linux kernel + compilers.
- sources/2025-03-07-meta-strobelight-a-profiling-service-built-on-open-source-technology — backend for Strobelight's memory profilers.
- sources/2026-08-27-cloudflare-how-we-saved-100-terabytes-of-memory-by-optimizing-1111s-dns — non-Meta consumer. jemalloc is Big Pineapple's allocator; its size-class bins are one of the two named costs of boxing DNS record variants, motivating a single-buffer wire-format layout.
Related¶
- systems/strobelight — downstream consumer of jemalloc's profiling API.
- systems/big-pineapple — non-Meta consumer; its DNS-cache layout is designed around jemalloc's size-class bins.
- systems/arm64-isa — target ISA of the AArch64-optimisation roadmap axis.
- huge-page-allocator — the HPA subsystem Meta is investing in.
- allocator-size-class — jemalloc's fixed-size bins.
- transparent-huge-pages — what HPA improvements target.
- stewardship-reset-for-foundational-oss — canonical pattern instance.
- patterns/upstream-the-fix — stewardship-axis sibling pattern.
- companies/meta