# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper, apt 安装 jemalloc

查看 jemalloc 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:jemalloc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install jemalloc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install jemalloc
```

  证据: MacPorts ports tree: devel/jemalloc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add jemalloc
```

  证据: Alpine Linux edge package indexes: jemalloc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install jemalloc
```

  证据: Fedora Rawhide package metadata: jemalloc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#jemalloc
```

  证据: nixpkgs package indexes: pkgs/by-name/je/jemalloc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S jemalloc
```

  证据: Arch Linux sync databases: jemalloc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install jemalloc
```

  证据: openSUSE Tumbleweed package metadata: jemalloc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- Debian apt (92%):

```sh
sudo apt install libjemalloc-dev
```

  证据: Debian stable package indexes: libjemalloc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:jemalloc
- **软件包管理器:** Homebrew
- **版本:** 5.3.1
- **来源摘要:** Implementation of malloc emphasizing fragmentation avoidance
- **主页:** <https://jemalloc.net/>
- **仓库:** <https://github.com/jemalloc/jemalloc>
- **最后更新:** 2026-07-29T09:39:17Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- jemalloc-config (别名)
- jemalloc.sh (别名)
- jeprof (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 5.3.1
## 项目历史与用法

jemalloc is a general-purpose malloc implementation known in package-manager catalogs because it can be installed as a system allocator, linked into performance-sensitive programs, or preloaded for applications that benefit from predictable allocation behavior.

### 项目历史

The project describes itself as emphasizing fragmentation avoidance and scalable concurrency. Its public history begins with use as the FreeBSD libc allocator in 2005, then broadens in 2010 with developer-facing facilities such as heap profiling and monitoring or tuning hooks.

The project site points to GitHub as the primary repository and treats the manual page and wiki as the two main documentation surfaces. Its branch layout has kept stable release tracking and older stable lines visible, which matters for downstream packaging because allocators are low-level dependencies with conservative upgrade habits.

### 采用历史

jemalloc moved from a FreeBSD allocator into a portable package used by applications that care about allocator behavior under concurrency and fragmentation pressure. Its adoption pattern is therefore less like a user-facing CLI and more like a selectable runtime component for databases, language runtimes, services, and performance investigations.

### 使用方式

Package users commonly install the library and development files, link programs against it, or use loader mechanisms to substitute it for the platform allocator. The bundled tools and scripts such as jemalloc-config, jemalloc.sh, and jeprof make the Homebrew formula useful both for building software and for profiling heap behavior.

### 为什么软件包爱好者会关心

jemalloc is package-nerd material because it sits below ordinary application code: swapping an allocator can change memory fragmentation, latency, profiling visibility, and production stability without changing the application source. Its presence across many package managers makes allocator choice a reproducible dependency rather than a local build trick.

### 时间线

- 2005: jemalloc first came into use as the FreeBSD libc allocator.
- 2010: development broadened to include heap profiling plus monitoring and tuning hooks.
- 2013: the public GitHub repository was created for the project.
- 2016: the project retired legacy mailing lists in favor of GitHub-based project activity.

### Related projects

- FreeBSD remains historically important because jemalloc entered production use through its libc allocator.
- jeprof is the related profiling utility shipped with the package for heap-profile analysis.
- Other allocator projects such as system malloc implementations and alternative malloc libraries are the natural comparison set, but jemalloc's packaging role is strongest where a program deliberately opts into its allocation behavior.

### 来源

- <https://github.com/jemalloc/jemalloc>
- <https://github.com/jemalloc/jemalloc/wiki>
- <https://jemalloc.net/>
- <https://jemalloc.net/jemalloc.3.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/malloc.conf
## 其他软件包管理器记录

- Debian apt - libjemalloc-dev - 5.3.0-3: normalized package name match | Debian stable package indexes: libjemalloc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | development files and documentation for jemalloc | https://jemalloc.net/
- Debian apt - libjemalloc2 - 5.3.0-3: normalized package name match | Debian stable package indexes: libjemalloc2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | general-purpose scalable concurrent malloc(3) implementation | https://jemalloc.net/
- Nix - jemalloc: normalized package name match | nixpkgs package indexes: pkgs/by-name/je/jemalloc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libjemalloc-dev - 5.3.0-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libjemalloc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | development files and documentation for jemalloc | https://jemalloc.net/
- Ubuntu apt - libjemalloc2 - 5.3.0-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libjemalloc2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | general-purpose scalable concurrent malloc(3) implementation | https://jemalloc.net/
- apk - jemalloc - 5.3.0-r6: normalized package name match | Alpine Linux edge package indexes: jemalloc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support | http://jemalloc.net
- apk - jemalloc-dev - 5.3.0-r6: normalized package name match | Alpine Linux edge package indexes: jemalloc-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support (development files) | http://jemalloc.net
- apk - jemalloc-doc - 5.3.0-r6: normalized package name match | Alpine Linux edge package indexes: jemalloc-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support (documentation) | http://jemalloc.net
- apk - jemalloc-static - 5.3.0-r6: normalized package name match | Alpine Linux edge package indexes: jemalloc-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support (static library) | http://jemalloc.net
- dnf - jemalloc - 5.3.0-14.fc44: normalized package name match | Fedora Rawhide package metadata: jemalloc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | General-purpose scalable concurrent malloc implementation | https://jemalloc.net/
- dnf - jemalloc-devel - 5.3.0-14.fc44: normalized package name match | Fedora Rawhide package metadata: jemalloc-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for jemalloc | https://jemalloc.net/
- pacman - jemalloc - 1:5.3.1-3: normalized package name match | Arch Linux sync databases: jemalloc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | General-purpose scalable concurrent malloc implementation | https://jemalloc.net/
- zypper - jemalloc - 5.3.1-1.4: normalized package name match | openSUSE Tumbleweed package metadata: jemalloc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | General-purpose scalable concurrent malloc implementation | http://jemalloc.net/
- zypper - jemalloc-devel - 5.3.1-1.4: normalized package name match | openSUSE Tumbleweed package metadata: jemalloc-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for jemalloc | http://jemalloc.net/
- zypper - libjemalloc2 - 5.3.1-1.4: normalized package name match | openSUSE Tumbleweed package metadata: libjemalloc2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | General-purpose scalable concurrent malloc implementation | http://jemalloc.net/
- MacPorts - jemalloc: normalized package name match | MacPorts ports tree: devel/jemalloc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/jemalloc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/jemalloc.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
