# foonathan/memory

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

Repository: https://github.com/foonathan/memory
Canonical: https://ross.abutalabs.com/products/memory
Homepage: https://memory.foonathan.net
Language: C++
License: Zlib
License Family: permissive
Topics: allocator, c-plus-plus, memory-allocation, memory
Last push: 2025-05-29T09:02:55+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 24, release rhythm 8, longevity 100
- inputs: {"age_days": 4175, "days_push": 461, "days_rel": 488, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1619, forks 205 (observed 2026-08-28T04:05:12.163534+00:00)

## What it is
foonathan/memory is a C++ library providing STL-compatible memory allocators built around a simpler RawAllocator concept. It offers multiple allocator implementations (pools, stacks, temporary allocators) plus adapters to interoperate with standard STL allocators.

## Use cases
- use custom memory pools with STL containers
- share one allocator across multiple types in C++
- allocate temporary memory on the stack like alloca portably
- track and debug memory leaks and double-frees
- improve allocation performance in games or embedded systems
- use allocators with smart pointers

## When to choose
- you need faster or pooled allocation for STL containers
- you want stateful, type-erased allocators that work with the standard library
- you develop on freestanding or embedded environments with custom memory
- you need memory debugging features like leak or overflow checks

## When to avoid
- your project has no allocation performance or control requirements
- you only need C++17 polymorphic memory resources
- you cannot build with CMake or an older toolchain

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools, performance
- platform: cpp, cross-platform, windows
- tags: allocator, raw-allocator, memory-pool, stl-compatible, cmake, memory, algorithms, linux, macos

## Member repositories
- foonathan/memory (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:12.163534+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:49:26.495819+00:00, confidence not recorded.
  - readme: https://github.com/foonathan/memory (fetched 2026-08-28T04:05:12.163534+00:00, sha 07a6f451241e)
  - homepage: https://memory.foonathan.net (fetched 2026-08-29T11:22:00.402716+00:00, sha f6bf9bf6a6cb)
  - site_page: https://memory.foonathan.net/md_doc_installation.html (fetched 2026-08-29T11:22:00.412622+00:00, sha 69cca4684ce0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
