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
- Language
- C++
- License
- MIT
- Forked
- 2025-10-24
- Sync status
- In syncLast synced 2026-10-13
More in Developer tools and infrastructure
iPhone Use lets Codex control a real iPhone over USB through WebDriverAgent for app navigation, page reading, gestures, and text entry. It automates phone tasks and shows a live screen preview.
Forked 2026-10-11Last synced 2026-10-13License: MITDeveloper tools and infrastructureGitHub
AnyPS5 ports PS5 executables to Linux and Windows by converting them to native formats and providing system PRX libraries for dynamic linking. It is for running compatible games without emulation or a separate runtime process.
Forked 2026-10-11Last synced 2026-10-13License: GPL-2.0Developer tools and infrastructureGitHub
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-13License: 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-13No license declaredDeveloper tools and infrastructureGitHub