# jemalloc

> General-purpose malloc implementation focused on fragmentation and concurrency

Source: https://talira.ai/catalog/jemalloc-nbhpk26e
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / memory allocators](https://talira.ai/categories/developer-tools/memory-allocators), [languages / c cpp](https://talira.ai/categories/languages/c-cpp)
- Platforms: linux, macos, windows[^2][^3]
- Licence: BSD-2-Clause[^4]
- Pricing: Free and open source[^4]
- Free tier: yes[^4]
- Backed by: [jemalloc](https://talira.ai/orgs/jemalloc.md), [Meta](https://talira.ai/orgs/meta.md)
- Funding: public company (NASDAQ:META)[^5]

jemalloc is a general-purpose malloc(3) implementation in C that emphasizes avoiding fragmentation and scaling across threads. It has been FreeBSD's libc allocator since 2005 and many applications link it in place of the system allocator for its predictable behaviour. Beyond malloc it has the non-standard mallocx family, per-thread caches and multiple arenas, the mallctl interface for reading statistics and changing settings at run time, runtime options through MALLOC_CONF, background threads that purge unused memory, transparent huge page settings, and optional heap profiling and leak detection. It builds with autoconf on Unix-like systems and with Visual Studio on Windows, and is BSD-licensed; Jason Evans created it, and Meta engineers develop it with the community.

## Links

- Website: https://jemalloc.net/
- GitHub: https://github.com/jemalloc/jemalloc
- Docs: https://jemalloc.net/jemalloc.3.html

## Problems it solves

- my Ruby on Rails processes keep growing in memory because of fragmentation
- reduce memory fragmentation in a long-running multithreaded server
- replace glibc malloc to cut a process's resident memory
- find where my C or C++ program allocates the most memory with heap profiling
- detect memory leaks in a native service in production
- an allocator that scales across many threads without lock contention
- read allocator statistics from inside my running program
- tune when freed memory is returned to the operating system
- use a different global allocator in my Rust program

## Features

- drop-in malloc(3), calloc, realloc and free implementation
- non-standard mallocx, rallocx, xallocx, sallocx, dallocx, sdallocx and nallocx APIs
- mallctl interface for statistics and run-time settings
- runtime options via malloc_conf, /etc/malloc.conf and MALLOC_CONF
- per-thread caches (tcache) and multiple arenas
- background threads that purge unused memory
- transparent huge page options such as metadata_thp
- heap profiling and leak detection (--enable-prof)
- configurable API prefix and private namespace for embedding
- autoconf build for Unix-like systems and Visual Studio build for Windows
- FreeBSD libc allocator since 2005

## Limitations

- Defaults are conservative: its tuning guide says the default settings are sometimes suboptimal for common workloads and that tuning usually gains a few percent[^1][^2][^3]
- Heap profiling is a build option: profiling and leak detection need jemalloc built with --enable-prof[^1][^2][^3]
- Older documentation is partly obsolete: the website warns that many details in older docs no longer apply[^1][^2][^3]

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.75 out of 1.
Signals: maintenance 1.00, adoption 0.81, momentum 0.56, community 0.94, backing 0.55, extensibility 0.00.

- last commit yesterday
- 126 commits in the last 90 days
- latest release 5.4.0 2 months ago
- 11.3k GitHub stars
- 229 contributors
- backed by jemalloc and Meta
- funding: public company (NASDAQ:META)

## Sources

[^1]: https://github.com/jemalloc/jemalloc/blob/dev/TUNING.md (checked 22 Nov 2026)
[^2]: https://github.com/jemalloc/jemalloc/blob/dev/INSTALL.md (checked 22 Nov 2026)
[^3]: https://jemalloc.net/ (checked 22 Nov 2026)
[^4]: https://github.com/jemalloc/jemalloc/blob/dev/COPYING (checked 22 Nov 2026)
[^5]: https://data.sec.gov/submissions/CIK0001326801.json (checked 20 Nov 2026)
