# GrapheneOS/hardened_malloc

Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platforms. It will gain more portability/integration over time.

Repository: https://github.com/GrapheneOS/hardened_malloc
Canonical: https://ross.abutalabs.com/products/hardened_malloc
Homepage: https://grapheneos.org/
Language: C
License: MIT
License Family: permissive
Topics: malloc, security, memory-allocation, malloc-library, memory-allocator, memory, hardening, slab-allocator, quarantine, grapheneos
Last push: 2026-08-13T17:29:43+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 39, longevity 100
- inputs: {"age_days": 2932, "days_push": 20, "days_rel": 192, "gap_med": 496, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1975, forks 157 (observed 2026-08-28T04:06:01.293706+00:00)

## What it is
hardened_malloc is a security-focused general purpose memory allocator implementing the malloc API with extensive hardening against heap corruption vulnerabilities. It integrates with Android's Bionic libc and can be used as a dynamic library with musl and glibc on Linux-based platforms.

## Use cases
- replace glibc malloc with a hardened allocator
- harden a Linux application against heap exploitation
- secure memory allocation on Android via Bionic integration
- reduce heap fragmentation and metadata overhead
- mitigate use-after-free and double-free vulnerabilities
- load a hardened allocator into existing binaries via LD_PRELOAD

## When to choose
- you need strong protection against heap corruption exploits on Android or Linux
- you want a malloc replacement with quarantine, canaries, and write-after-free detection
- you are building a security-focused OS or hardened software distribution

## When to avoid
- you need maximum allocator micro-benchmark performance over security
- you target 32-bit platforms or non-Linux operating systems
- you need Windows or macOS support

## Facets
- artifact type: library
- maturity: active
- function: security, cryptography
- domain: security, operating-systems, developer-tools
- platform: cross-platform
- tags: memory-allocator, malloc, hardening, exploit-mitigation, slab-allocator, quarantine, bionic, musl, glibc, c, android, linux

## Member repositories
- GrapheneOS/hardened_malloc (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:01.293706+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:04:51.348587+00:00, confidence not recorded.
  - readme: https://github.com/GrapheneOS/hardened_malloc (fetched 2026-08-28T04:06:01.293706+00:00, sha cd406b85b649)
  - homepage: https://grapheneos.org/ (fetched 2026-08-29T10:43:57.654172+00:00, sha fd2048a5631b)
  - site_page: https://grapheneos.org/features (fetched 2026-08-29T10:43:57.663736+00:00, sha 0c04eca55939)
  - site_page: https://grapheneos.org/install (fetched 2026-08-29T10:43:57.668511+00:00, sha 1069f5fe9080)
  - site_page: https://grapheneos.org/faq (fetched 2026-08-29T10:43:57.670439+00:00, sha 8f5ac8ce4a47)
  - site_page: https://grapheneos.org/releases (fetched 2026-08-29T10:43:57.676360+00:00, sha 5690feec0727)
- Data as of 2026-08-30T08:39:29.467469+00:00.
