Skip to main content

Module slab

Module slab 

Source
Expand description

Thread-local generational slab for connection sessions (MM-01).

Session slots are pre-reserved up front and reused via free list; the 16-bit generation counter guards against ABA when a completion for a closed session races the slot’s reuse. Single-threaded by design: the worker that owns a slab is the only thread that touches it.

Structs§

SessionSlab
Generational slab of sessions.

Enums§

SlabError
Errors from SessionSlab::new.

Constants§

MAX_SLOTS
Maximum sessions a slab tracks (24-bit slot index in crate::token::Token).

Traits§

GenerationBump
Bumps a slot’s generation (called by the worker right before reuse).