Skip to main content

Crate orthotope

Crate orthotope 

Source
Expand description

Orthotope is an arena-backed allocator with fixed size classes, per-thread caches, a shared central pool, and a tracked large-allocation path.

Use allocate and deallocate for the process-global convenience API, or construct an Allocator plus one ThreadCache per participating thread for direct instance-oriented use. Downstream binaries may also opt in to a #[global_allocator] adapter via OrthotopeGlobalAlloc.

Only free live pointers returned by Orthotope. Debug builds detect some small-object double frees, but same-arena pointer forgery and stale-pointer ABA cases are still outside the allocator’s guaranteed provenance boundary.

Re-exports§

pub use crate::allocator::Allocator;
pub use crate::api::allocate;
pub use crate::api::deallocate;
pub use crate::api::deallocate_with_size;
pub use crate::api::global_stats;
pub use crate::config::AllocatorConfig;
pub use crate::error::AllocError;
pub use crate::error::FreeError;
pub use crate::error::InitError;
pub use crate::global_alloc::OrthotopeGlobalAlloc;
pub use crate::size_class::SizeClass;
pub use crate::stats::AllocatorStats;
pub use crate::stats::SizeClassStats;
pub use crate::stats::ThreadCacheStats;
pub use crate::thread_cache::ThreadCache;

Modules§

allocator
Standalone allocator instances and the instance-oriented API.
api
Process-global convenience allocation and free functions.
arena
Monotonic pre-mapped arena reservations.
central_pool
Shared batch exchange between thread-local caches.
config
Allocator sizing and cache-tuning configuration.
error
Typed initialization, allocation, and free failures.
free_list
Intrusive free-list primitives used by allocator internals.
global_alloc
Optional GlobalAlloc adapter for downstream binary opt-in. Optional adapter for using Orthotope through Rust’s GlobalAlloc trait.
header
Allocation-header constants and pointer-layout helpers. Allocation-header layout and pointer conversions used for deallocation routing.
large_object
Live tracking for allocations above the largest small class.
size_class
Fixed request buckets and class sizing helpers.
stats
Allocator and thread-cache statistics snapshots.
thread_cache
Caller-owned per-thread cache state for the instance API.