Module erdnuss_comms::frame_pool
source · Expand description
Frame Pool
This is a specialized pool allocator. It is optimized and opinionated for the following cases:
- Use where you want to store multiple chunks of bytes, in the size range of 1..=255 bytes
- Use in cases where the target may not have CAS atomics,
so only
load
andstores
are used for synchronization
This allows for the creation of FrameBox
allocations, that
can only be allocated with exclusive access to a RawFrameSlice
,
but can be deallocated by dropping (just like a Box from the standard
library), and do not require any kind of mutex at the time of drop.
Structs
- An allocated frame storage
- Storage for exactly N frames
- A sliceable allocation pool
- SendFrameBox represent a message to be sent over the wire.
- WireFrameBox represents a valid packet received from the wire