#[repr(C)]
pub struct LlmpPage { pub magic: u64, pub sender_id: ClientId, pub safe_to_unmap: AtomicU16, pub sender_dead: AtomicU16, pub current_msg_id: AtomicU64, pub size_total: usize, pub size_used: usize, pub max_alloc_size: usize, pub messages: [LlmpMsg; 0], }
Expand description

Contents of the share mem pages, used by llmp internally

Fields

magic: u64

to check if this page got initialized properly

sender_id: ClientId

The id of the sender

safe_to_unmap: AtomicU16

Set to != 1 by the receiver, once it got mapped. It’s not safe for the sender to unmap this page before (The os may have tidied up the memory when the receiver starts to map)

sender_dead: AtomicU16

Not used at the moment (would indicate that the sender is no longer there)

current_msg_id: AtomicU64

The current message ID

size_total: usize

How much space is available on this page in bytes

size_used: usize

How much space is used on this page in bytes

max_alloc_size: usize

The maximum amount of bytes that ever got allocated on this page in one go. An inidactor of what to use as size for future pages

messages: [LlmpMsg; 0]

Pointer to the messages, from here on.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The Resulting TupleList, of an Prepend::prepend() call, including the prepended entry. Read more

Prepend a value to this tuple, returning a new tuple with prepended value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.