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.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
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-19
More in Developer tools and infrastructure
An open-source TypeScript engine for calculating Zi Wei Dou Shu charts and consulting traditional references. It helps developers build charting and interpretation tools.
Forked 2026-10-18Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
ImHex is a hex editor for inspecting and editing binary files. Reverse engineers, programmers, and forensic users can search and patch bytes or describe file structures with its pattern language.
Forked 2026-10-17Last synced 2026-10-19License: GPL-2.0Developer tools and infrastructureGitHub
Numa is a portable DNS resolver for local development and privacy. It blocks ads, gives local services names like frontend.numa, and runs without depending on a cloud account.
Forked 2026-10-17Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
Handwired turns ordinary JavaScript logic into differentiable neural-network-style calculations, so programs can run as matrix operations in JavaScript or WebGPU. It is for experimenting with GPU execution and optimization of code written in a traditional style.
Forked 2026-10-16Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub