Skip to main content

oxidelake_memory/
lib.rs

1//! Memory management for OxideLake (docs/SPEC.md §2.1): aligned host buffers,
2//! pinned (CUDA) and unified (Metal) allocations, Arrow IPC encoding for
3//! spill files, and the three-tier spill manager.
4//!
5//! * [`AlignedBuf`] — zeroed, explicitly aligned host allocation.
6//! * [`HostAlloc`] — host buffer that is pinned when a [`PinnedProvider`] can
7//!   deliver it and pageable otherwise; the class is observable.
8//! * [`SpillManager`] — device → host → disk demotion with LRU eviction; the
9//!   disk tier is Arrow IPC written through an `object_store::ObjectStore`.
10//!
11//! Dependency direction: depends on `oxidelake-core` only.
12
13pub mod aligned;
14pub mod class;
15pub mod host;
16pub mod ipc;
17pub mod spill;
18
19#[cfg(feature = "cuda")]
20pub mod pinned;
21
22#[cfg(all(feature = "metal", target_os = "macos"))]
23pub mod metal;
24
25pub use aligned::AlignedBuf;
26pub use class::MemoryClass;
27pub use host::{HostAlloc, PinnedProvider};
28pub use spill::{BatchId, DeviceResident, SpillBudget, SpillManager, Tier};