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-09-29
More in Developer tools and infrastructure
DBX is a lightweight, cross-platform database client for connecting to and managing over 100 database types. It offers desktop, Docker, and CLI access, plus AI assistance and an MCP Server for database workflows.
Forked 2026-09-29Last synced 2026-09-29License: Apache-2.0Developer tools and infrastructureGitHub
Escrcpy is a graphical desktop interface for scrcpy that mirrors and controls Android devices. It helps developers and testers manage connected devices, including wireless and multi-device workflows.
Forked 2026-09-29Last synced 2026-09-29License: Apache-2.0Developer tools and infrastructureGitHub
Lightpanda is a headless browser built from scratch for AI agents and automation. It aims to be lighter and faster than Chromium and works with Playwright and Puppeteer.
Forked 2026-09-28Last synced 2026-09-29License: AGPL-3.0Developer tools and infrastructureGitHub
A self-hosted open-source monitoring platform for servers, apps and infrastructure. It offers uptime monitoring, distributed checks, incident tracking and alerts.
Forked 2026-09-28Last synced 2026-09-29License: MITDeveloper tools and infrastructureGitHub