# mkirchner/gc

Simple, zero-dependency garbage collection for C

Repository: https://github.com/mkirchner/gc
Canonical: https://ross.abutalabs.com/products/gc
Language: C
License: MIT
License Family: permissive
Topics: c, garbage-collection, memory-management, zero-dependency
Last push: 2024-08-04T17:51:00+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2452, "days_push": 759, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1306, forks 73 (observed 2026-08-28T04:04:18.788367+00:00)

## What it is
A small, zero-dependency conservative mark-and-sweep garbage collector for C that replaces malloc/calloc/realloc/free. It is designed to be conceptually clean and readable, making it well suited for learning how garbage collection works.

## Use cases
- add garbage collection to a C program
- learn how mark-and-sweep garbage collectors work
- replace malloc and free with a GC-managed allocator
- build a Lisp or scripting language interpreter in C
- study a simple readable GC implementation

## When to choose
- you want a tiny, dependency-free GC for a C project
- you are building an interpreter or language runtime in C
- you want readable source code to study GC internals

## When to avoid
- you need a production-hardened, architecture-optimized collector (use Boehm GC)
- you need multithreaded or concurrent garbage collection
- you need predictable real-time latency

## Facets
- artifact type: library
- maturity: active
- function: developer-tools
- domain: programming-languages, developer-tools
- platform: c, cross-platform
- tags: garbage-collection, mark-and-sweep, conservative-gc, memory-allocator, zero-dependency, learning-resource, memory-management, algorithms, linux, macos

## Member repositories
- mkirchner/gc (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:18.788367+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-30T04:50:58.607912+00:00, confidence not recorded.
  - readme: https://github.com/mkirchner/gc (fetched 2026-08-28T04:04:18.788367+00:00, sha 2ba963a2fccd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
