# sebbbi/OffsetAllocator

Fast O(1) offset allocator with minimal fragmentation

Repository: https://github.com/sebbbi/OffsetAllocator
Canonical: https://ross.abutalabs.com/products/offsetallocator
Language: C++
License: MIT
License Family: permissive
Last push: 2024-04-30T15:06:34+00:00

## Health v2 (maintenance only)
Score: 31/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 94
- inputs: {"age_days": 1319, "days_push": 855, "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 1057, forks 60 (observed 2026-08-28T04:03:24.774269+00:00)

## What it is
A fast hard-realtime O(1) offset allocator in C++ with minimal fragmentation, using 256 floating-point-distributed bins and two-level bitfields. It returns offsets rather than pointers, making it ideal for sub-allocating GPU heaps, buffers, and other resources.

## Use cases
- sub-allocate GPU heap memory in a rendering engine
- allocate offsets into a large buffer with hard real-time guarantees
- replace pow2 buddy allocators to reduce memory waste
- manage VRAM allocations in a game engine
- implement fast fixed-size-class memory pooling

## When to choose
- you need O(1) worst-case allocation with bounded fragmentation overhead (~6.25% average)
- you allocate offsets into a resource like a GPU heap rather than raw memory
- hard real-time constraints rule out general-purpose allocators

## When to avoid
- you need a general-purpose malloc replacement returning pointers
- allocation sizes are highly irregular and unbounded
- your project is not C++

## Facets
- artifact type: library
- maturity: active
- function: caching
- domain: graphics, performance
- platform: cpp, cross-platform
- tags: allocator, gpu-memory, real-time, sub-allocation, o1, header-only, memory-allocation, algorithms

## Member repositories
- sebbbi/OffsetAllocator (main) score 31

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:24.774269+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-30T06:58:00.138861+00:00, confidence not recorded.
  - readme: https://github.com/sebbbi/OffsetAllocator (fetched 2026-08-28T04:03:24.774269+00:00, sha 91c2b380d317)
- Data as of 2026-08-30T08:39:29.467469+00:00.
