# mattconte/tlsf

Two-Level Segregated Fit memory allocator implementation.

Repository: https://github.com/mattconte/tlsf
Canonical: https://ross.abutalabs.com/products/tlsf
Language: C
License Family: other
Last push: 2021-11-06T02:03:16+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": 4117, "days_push": 1762, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1603, forks 239 (observed 2026-08-28T04:05:09.875475+00:00)

## What it is
TLSF (Two-Level Segregated Fit) is a real-time memory allocator implementation in C offering O(1) malloc, free, realloc, and memalign with low fragmentation and minimal overhead. It supports multiple memory pools that can be added and removed at runtime, and is designed for embedded and real-time systems.

## Use cases
- real-time memory allocator with O(1) malloc and free
- embedded systems heap allocator with low fragmentation
- custom allocator for memory pools in C
- deterministic allocator for game consoles or RTOS
- allocator with fixed 4-byte per-allocation overhead
- manage multiple memory pool regions dynamically

## When to choose
- you need deterministic O(1) allocation timing for real-time or embedded systems
- you manage fixed memory pools and want low fragmentation and tiny footprint
- you need a small, portable C allocator without thread-safety overhead

## When to avoid
- you need a thread-safe allocator out of the box
- you require a specific license (the repo lacks an explicit license file)
- you need general-purpose system allocator features like huge pages or NUMA awareness

## Facets
- artifact type: library
- maturity: maintenance
- function: embedded
- domain: embedded-systems, developer-tools, performance
- platform: c, cpp, embedded, cross-platform
- tags: memory-allocator, tlsf, real-time, o1-allocator, heap, memory-management, allocator

## Member repositories
- mattconte/tlsf (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.875475+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:52:27.244716+00:00, confidence not recorded.
  - readme: https://github.com/mattconte/tlsf (fetched 2026-08-28T04:05:09.875475+00:00, sha 968c3f0d60fb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
