Skip to main content

store_io_buf/
lib.rs

1//! # store-io-buf
2//!
3//! Aligned I/O buffers for store-io.
4//!
5//! A [`BufPool`] maps one page-aligned arena at creation and carves it into
6//! power-of-two size classes. [`BufPool::take`] pops a free slot from the
7//! class's lock-free free list: no allocation, no lock, no system call, ever
8//! blocking. An [`IoBuf`] owns its slot exclusively, moves into an I/O and
9//! back out in the completion, and returns to its class when dropped.
10//!
11//! A pool configured as sensitive wipes every buffer on return ([`wipe`]),
12//! and locks its arena in RAM and out of core dumps where the OS allows it.
13
14#![deny(warnings)]
15#![deny(unsafe_op_in_unsafe_fn)]
16
17pub mod arena;
18mod pad;
19pub mod pool;
20mod queue;
21mod stack;
22mod sync;
23mod wait;
24mod wipe;
25
26pub use pad::CachePadded;
27pub use pool::{BufPool, ClassSpec, Exhausted, IoBuf, PoolConfig, PoolError};
28pub use queue::IndexQueue;
29pub use stack::IndexStack;
30pub use wait::WaitWord;
31pub use wipe::wipe;