memkit
Core CPU memory allocation primitives for the memkit ecosystem.
Version: 0.1.0-alpha.1
Overview
memkit provides deterministic, intent-driven memory allocation for game engines and real-time applications. It offers predictable performance through explicit lifetimes and zero-cost abstractions.
Features
- Frame Arenas — O(1) bump allocation, instant bulk reset per frame
- Object Pools — O(1) allocation/deallocation for small objects
- Heap Allocation — Tracked heap allocations with statistics
- Scoped Allocation — RAII-style checkpoint/restore within frames
- Thread-Local Fast Paths — Per-thread arenas avoid contention
Quick Start
use ;
let alloc = new;
// Game loop
loop
Types
| Type | Description |
|---|---|
MkAllocator |
Main allocator entry point |
MkConfig |
Allocator configuration |
MkFrameBox<T> |
Frame-allocated box |
MkFrameSlice<T> |
Frame-allocated slice |
MkFrameVec<T> |
Frame-allocated vector |
MkPoolBox<T> |
Pool-allocated box |
MkHeapBox<T> |
Heap-allocated box |
MkScope |
Scoped checkpoint guard |
Configuration
let config = MkConfig ;
License
This project is licensed under the Mozilla Public License 2.0 - see the LICENSE.md file for details.