Skip to main content

SIZE_CLASSES

Constant SIZE_CLASSES 

Source
pub(crate) const SIZE_CLASSES: [usize; 8];
Available on Unix and crate feature pool only.
Expand description

Chunk size classes in bytes, smallest first. The pool places each chunk in the smallest class that fits its payload.

The top classes deliberately overshoot the batchers’ nominal ~2 MiB chunk target: the ship heuristic re-targets the next 2 MiB boundary whenever a single push crosses one, so real chunk sizes are multimodal with bands just under each boundary. A class that fits only the nominal target sends the higher bands to the unpageable heap fallback. Slot internal fragmentation is virtual-only — slots populate lazily, so a chunk costs physical memory for its payload, not its class size.