OffsetAllocator
A fast memory offset allocator with constant-time operations and little fragmentation. It suits real-time programs such as games and graphics that need predictable allocation speed.
Share on XLicense: MIT
Overview
OffsetAllocator is a C++ allocator that hands out offsets into a range rather than memory pointers, with every operation running in constant time. It uses 256 bins sized on an 8-bit floating point scale and a two-level bitfield to find the next free bin. This bounds wasted space to at most 12.5 percent, compared with up to 100 percent for power-of-two bins. Metadata is stored separately, so it can sub-allocate GPU heaps, buffers and arrays.
Key features
- O(1) allocation and free with hard real-time behavior
- 256 bins on a floating point size scale
- Waste limited to 12.5 percent, 6.25 percent on average
- Metadata kept apart from the managed resource
- Returns the offset of a contiguous range
Best for
Game and graphics programmers who need predictable allocation time when sub-allocating resources such as GPU buffers. It manages offsets, not the memory itself.
- Upstream
- sebbbi/OffsetAllocator
- Fork on GitHub
- Guo-astro/OffsetAllocator
- Upstream stars
- 1.1k
- Category
- Developer tools and infrastructure
- License
- MIT
- Forked
- 2025-10-24
- Sync status
- In syncLast synced 2026-10-10
More in Developer tools and infrastructure
Creates full-stack project scaffolds from compatible stack parts, reducing setup and integration work. Use the CLI, browser builder, or MCP server to generate a project.
Forked 2026-10-09Last synced 2026-10-10License: MITDeveloper tools and infrastructureGitHub
A Python SDK for adding local face detection, landmark extraction, and face comparison to applications on Windows and Linux, without sending images off-device.
Forked 2026-10-09Last synced 2026-10-10No license declaredDeveloper tools and infrastructureGitHub
Whole-disk file search for macOS that finds files by name quickly, handles typos, and searches indexed file contents. Best for local desktop search from the CLI or Rust crate.
Forked 2026-10-08Last synced 2026-10-10License: MITDeveloper tools and infrastructureGitHub
REA helps reverse engineers inspect apps, binaries, and runtime behavior with agent workflows. It is used to understand how a feature works, find evidence, and build a similar capability in a project.
Forked 2026-10-08Last synced 2026-10-10License: MITDeveloper tools and infrastructureGitHub