# Install dmalloc with Homebrew, apt, MacPorts, Nix

Debug versions of system memory management routines. Version 5.6.5 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:dmalloc
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dmalloc
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dmalloc
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install libdmalloc-dev
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#dmalloc
```

  Evidence: nixpkgs package indexes: pkgs/by-name/dm/dmalloc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:dmalloc
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dmalloc>
- **Version:** 5.6.5
- **Source summary:** Debug versions of system memory management routines
- **Homepage:** <https://dmalloc.com/>
- **Repository:** <https://github.com/j256/dmalloc>
- **Upstream docs:** <https://dmalloc.com/docs/dmalloc.html>
- **License:** ISC
- **Source archive:** <https://dmalloc.com/releases/dmalloc-5.6.5.tgz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- dmalloc (cli)
- dmalloc (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 5.6.5
- Local data: ok
- Upstream repository: https://dmalloc.com/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Dmalloc is Gray Watson's debug memory allocation library, designed as a drop-in replacement for malloc, realloc, calloc, free, and related routines while adding runtime-configurable memory debugging.

### Project history

The manual carries copyright years from 1992 to 2020 and identifies version 5.6.5 as a December 2020 release. Its feature set reflects a long-lived C debugging niche: leak tracking, fence-post write detection, file and line reporting, statistics logging, and threaded-program support.

### Adoption history

Dmalloc's official documentation lists successful use across a wide range of Unix and non-Unix systems, including AIX, the BSDs, GNU/Hurd, HP-UX, IRIX, Linux, macOS, NeXT, OSF/DUX, SCO, Solaris, Ultrix, UnixWare, Windows, and Unicos on a Cray T3E.

### How it is used

Typical use links the dmalloc library into a C or C++ program, optionally includes dmalloc.h for file and line reporting, and uses the dmalloc utility plus the DMALLOC_OPTIONS environment variable to enable checks such as leak logging, heap verification, and abort-on-error behavior.

### Why package nerds care

Dmalloc is historically interesting because it predates many modern sanitizers yet remains a compact, portable package-manager answer for C heap debugging. Its shell integration, runtime token model, and static-library workflow make it feel like classic Unix debugging infrastructure.

### Timeline

- 1992: Earliest copyright year in the official manual.
- 2020-12: Dmalloc manual identifies version 5.6.5.

### Related projects

- Dmalloc sits in the same practical debugging space as allocator wrappers, leak checkers, and compiler/runtime sanitizers, but its official documentation focuses on replacing the standard allocation routines directly.

### Sources

- <https://dmalloc.com/>
- <https://dmalloc.com/docs/dmalloc.html>
- <https://github.com/j256/dmalloc>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - libdmalloc-dev - 5.5.2-14+b3: normalized package name match | Debian stable package indexes: libdmalloc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | debug memory allocation library (development files and doc) | http://dmalloc.com/
- Debian apt - libdmalloc5 - 5.5.2-14+b3: normalized package name match | Debian stable package indexes: libdmalloc5 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | debug memory allocation library | http://dmalloc.com/
- Nix - dmalloc: normalized package name match | nixpkgs package indexes: pkgs/by-name/dm/dmalloc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libdmalloc-dev - 5.5.2-14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libdmalloc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | debug memory allocation library (development files and doc) | http://dmalloc.com/
- Ubuntu apt - libdmalloc5 - 5.5.2-14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libdmalloc5 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | debug memory allocation library | http://dmalloc.com/
- MacPorts - dmalloc: normalized package name match | MacPorts ports tree: devel/dmalloc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [valgrind](https://www.automicvault.com/pkg/brew/valgrind/) - Shares av.db curated category or tags: c, cli, debugging, developer-tools, memory-debugging.
- [cargo-careful](https://www.automicvault.com/pkg/brew/cargo-careful/) - Shares av.db curated category or tags: cli, debugging, developer-tools.
- [cdebug](https://www.automicvault.com/pkg/brew/cdebug/) - Shares av.db curated category or tags: cli, debugging, developer-tools.
- [chdig](https://www.automicvault.com/pkg/brew/chdig/) - Shares av.db curated category or tags: cli, debugging, developer-tools.
- [crash](https://www.automicvault.com/pkg/brew/crash/) - Shares av.db curated category or tags: cli, debugging, developer-tools.
- [ddd](https://www.automicvault.com/pkg/brew/ddd/) - Shares av.db curated category or tags: cli, debugging, developer-tools.
- [delve](https://www.automicvault.com/pkg/brew/delve/) - Shares av.db curated category or tags: cli, debugging, developer-tools.
- [demumble](https://www.automicvault.com/pkg/brew/demumble/) - Shares av.db curated category or tags: cli, debugging, developer-tools.
- [docker-debug](https://www.automicvault.com/pkg/brew/docker-debug/) - Local package facts share a topical domain. Shared terms: cli, debug, debugging, developer, developer-tools.
- [dwarfutils](https://www.automicvault.com/pkg/brew/dwarfutils/) - Local package facts share a topical domain. Shared terms: cli, debug, debugging, developer, developer-tools.
- [gebug](https://www.automicvault.com/pkg/brew/gebug/) - Local package facts share a topical domain. Shared terms: cli, debug, debugging, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/dmalloc.yml](https://github.com/automic-vault/db/blob/main/combined/dmalloc.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
