Describes either a memory location or a view of an associated location.
This module stores byte buffers in queues using sequences of entries. The first entry holds an address, and subsequent entries hold the offset and lengths of ever-narrower views of that data. This provides a compact representation of data encoded using nested or layered protocols.
For example, in a TCP/IP stack:
- The first entry hold addresses to Ethernet frames.
- The second entry holds a zero offset and the whole frame length.
- The third entry holds the offset and length describing the IP data.
- The fourth entry holds the offset and length describing the TCP data.
|
|
static constexpr size_type | num_chunks (const Deque &deque, size_type entries_per_chunk) |
| | Returns the number of chunks in a deque.
|
| |
| static constexpr size_type | num_layers (size_type entries_per_chunk) |
| |
|
static constexpr size_type | memory_context_index (size_type chunk, size_type entries_per_chunk) |
| | Returns the index to the data entry of a given chunk.
|
| |
|
static constexpr size_type | data_index (size_type chunk, size_type entries_per_chunk) |
| | Returns the index to the data entry of a given chunk.
|
| |
|
static constexpr size_type | base_view_index (size_type chunk, size_type entries_per_chunk) |
| | Returns the index to the base view entry of a given chunk.
|
| |
|
static constexpr size_type | view_index (size_type chunk, size_type entries_per_chunk, size_type layer) |
| | Returns the index to a view entry of a given chunk.
|
| |
|
static constexpr size_type | top_view_index (size_type chunk, size_type entries_per_chunk) |
| | Returns the index to the top view entry of a given chunk.
|
| |
|
static constexpr std::byte * | GetData (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns the memory backing the chunk at the given index.
|
| |
| static constexpr bool | IsOwned (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| |
| static constexpr bool | IsShared (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| |
|
static constexpr bool | IsSealed (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns whether the chunk is part of a sealed layer.
|
| |
|
static constexpr Deallocator & | GetDeallocator (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns the deallocator for a chunk, which must be owned.
|
| |
|
static constexpr allocator::internal::ControlBlock & | GetControlBlock (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns the control block for a chunk, which must be shared.
|
| |
|
static constexpr bool | IsBoundary (const Deque &deque, size_type chunk, size_type entries_per_chunk, size_type layer) |
| | Returns whether the given layer of a chunk represents a fragment boundary.
|
| |
|
static constexpr bool | IsBoundary (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns whether the top layer of a chunk represents a fragment boundary.
|
| |
|
static constexpr size_type | GetOffset (const Deque &deque, size_type chunk, size_type entries_per_chunk, size_type layer) |
| | Returns the offset of the given layer of the chunk.
|
| |
|
static constexpr size_type | GetOffset (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns the offset of the top layer of the chunk.
|
| |
| static constexpr size_type | GetRelativeOffset (const Deque &deque, size_type chunk, size_type entries_per_chunk, size_type layer) |
| |
| static constexpr size_type | GetRelativeOffset (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| |
|
static constexpr size_type | GetLength (const Deque &deque, size_type chunk, size_type entries_per_chunk, size_type layer) |
| | Returns the length of the given layer of the chunk.
|
| |
|
static constexpr size_type | GetLength (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns the length of the top layer of the chunk.
|
| |
|
static constexpr ByteSpan | GetView (const Deque &deque, size_type chunk, size_type entries_per_chunk, size_type layer) |
| | Returns a view of the visible data length of the chunk at the given layer.
|
| |
|
static constexpr ByteSpan | GetView (const Deque &deque, size_type chunk, size_type entries_per_chunk) |
| | Returns a view of the visible data length of the chunk at the top layer.
|
| |