Expand description
§store-io-buf
Aligned I/O buffers for store-io.
A BufPool maps one page-aligned arena at creation and carves it into
power-of-two size classes. BufPool::take pops a free slot from the
class’s lock-free free list: no allocation, no lock, no system call, ever
blocking. An IoBuf owns its slot exclusively, moves into an I/O and
back out in the completion, and returns to its class when dropped.
A pool configured as sensitive wipes every buffer on return (wipe),
and locks its arena in RAM and out of core dumps where the OS allows it.
Re-exports§
pub use pool::BufPool;pub use pool::ClassSpec;pub use pool::Exhausted;pub use pool::IoBuf;pub use pool::PoolConfig;pub use pool::PoolError;
Modules§
- arena
- Page-aligned memory for I/O buffers, mapped once and never reallocated.
- pool
- The buffer pool: fixed size classes carved out of one arena, each with a lock-free free list. Taking a buffer never allocates and never blocks.
Structs§
- Cache
Padded - Aligns and pads
Tto 128 bytes: two 64-byte lines, because adjacent-line prefetchers on x86-64 and 128-byte lines on Apple silicon otherwise still cause false sharing. - Index
Queue - Bounded MPMC queue of
u32values. - Index
Stack - Bounded LIFO stack of
u32values below its capacity. - Wait
Word - A 32-bit word threads sleep on until it changes.
Functions§
- wipe
- Overwrites
byteswith zeros in a way the compiler cannot elide.