Skip to main content

Crate memkit

Crate memkit 

Source
Expand description

§memkit

Intent-driven memory allocation toolkit for high-performance Rust applications.

§Features

  • Frame Arenas: Lock-free bump allocation, reset per frame
  • Object Pools: O(1) reuse for small, frequent allocations
  • Thread Coordination: Explicit transfers, barriers, per-thread budgets
  • Zero-cost abstractions: Pay only for what you use

§Quick Start

use memkit::{MkAllocator, MkConfig};

let alloc = MkAllocator::new(MkConfig::default());

// Game loop
alloc.begin_frame();
let temp = alloc.frame_alloc::<[f32; 256]>();
// ... use temp ...
alloc.end_frame();

§Crate Ecosystem

  • memkit: Core allocation primitives (this crate)
  • memkit-gpu: Backend-agnostic GPU memory management
  • memkit-async: Async-aware allocators for Tokio/async-std
  • memkit-bevy: Bevy ECS integration
  • memkit-rapier: Rapier physics integration

Re-exports§

pub use prelude::*;

Modules§

allocator
The main allocator type.
config
Allocator configuration.
container
Container types for managed allocations.
lifecycle
Lifecycle management types.
policy
Memory policies.
prelude
Common types for easy ingestion.
sync
Synchronization primitives.
tag
Allocation tagging and intent.
traits
Core traits for memkit.