# 使用 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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
- **软件包管理器页面:** <https://formulae.brew.sh/formula/jemalloc>
- **版本:** 5.3.1
- **来源摘要:** Implementation of malloc emphasizing fragmentation avoidance
- **主页:** <https://jemalloc.net/>
- **仓库:** <https://github.com/jemalloc/jemalloc>
- **上游文档:** <https://jemalloc.net/>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://github.com/jemalloc/jemalloc/releases/download/5.3.1/jemalloc-5.3.1.tar.bz2>
- **最后更新:** 2026-07-29T09:39:17Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

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

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 5.3.1
- 管理器更新时间: 2026-07-29
- 本地数据: OK
- 上游仓库: https://github.com/jemalloc/jemalloc
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

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
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** jemalloc
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Matched curated package taxonomy and local package facts.
- [nghttp2](https://pkg.so/zh-hans/brew/nghttp2/) - Popular package that depends on this formula.
- [bind](https://pkg.so/zh-hans/brew/bind/) - Popular package that depends on this formula.
- [snort](https://pkg.so/zh-hans/brew/snort/) - Popular package that depends on this formula.
- [chapel](https://pkg.so/zh-hans/brew/chapel/) - Popular package that depends on this formula.
- [openvdb](https://pkg.so/zh-hans/brew/openvdb/) - Popular package that depends on this formula.
- [libcpucycles](https://pkg.so/zh-hans/brew/libcpucycles/) - Shares pkgdb curated category or tags: c, cli, performance, system.
- [libzip](https://pkg.so/zh-hans/brew/libzip/) - Shares pkgdb curated category or tags: c, cli, system.
- [fastfetch](https://pkg.so/zh-hans/brew/fastfetch/) - Shares pkgdb curated category or tags: c, cli, system.
- [numactl](https://pkg.so/zh-hans/brew/numactl/) - Shares pkgdb curated category or tags: cli, performance, system.
- [fio](https://pkg.so/zh-hans/brew/fio/) - Shares pkgdb curated category or tags: cli, performance, system.
- [asitop](https://pkg.so/zh-hans/brew/asitop/) - Shares pkgdb curated category or tags: cli, performance, system.
- [sysbench](https://pkg.so/zh-hans/brew/sysbench/) - Shares pkgdb curated category or tags: cli, performance, system.
- [opencl-icd-loader](https://pkg.so/zh-hans/brew/opencl-icd-loader/) - Shares pkgdb curated category or tags: c, cli, system.
- [mbw](https://pkg.so/zh-hans/brew/mbw/) - Local package facts share a topical domain. Shared terms: cli, memory, performance, system.
- [vmtouch](https://pkg.so/zh-hans/brew/vmtouch/) - Local package facts share a topical domain. Shared terms: cli, memory, performance, system.

## 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
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
