Skip to main content

grafeo_common/memory/
mod.rs

1//! Custom allocators tuned for graph database workloads.
2//!
3//! These allocators give you better performance than the global allocator
4//! for specific patterns. Pick the right one for your use case:
5//!
6//! | Allocator | Best for | Trade-off |
7//! | --------- | -------- | --------- |
8//! | [`arena`] | MVCC versioning, bulk alloc/dealloc | Can't free individual items |
9//! | [`bump`] | Temporary data within a query | Must reset to free anything |
10//! | [`pool`] | Frequently reused objects | Fixed-size objects only |
11//! | [`buffer`] | Large data, memory pressure | More complex API |
12
13pub mod arena;
14pub mod buffer;
15pub mod bump;
16pub mod pool;
17
18pub use arena::{Arena, ArenaAllocator};
19pub use buffer::{
20    BufferManager, BufferManagerConfig, BufferStats, MemoryConsumer, MemoryGrant, MemoryRegion,
21    PressureLevel,
22};
23pub use bump::BumpAllocator;
24pub use pool::ObjectPool;