#[repr(C)]
pub struct lean_object { pub m_rc: c_int, pub m_cs_sz: u16, pub m_other: u8, pub m_tag: u8, }
Expand description

Lean object header.

The reference counter m_rc field also encodes whether the object is single threaded (> 0), multi threaded (< 0), or reference counting is not needed (== 0). We don’t use reference counting for objects stored in compact regions, or marked as persistent.

For “small” objects stored in compact regions, the field m_cs_sz contains the object size. For “small” objects not stored in compact regions, we use the page information to retrieve its size.

During deallocation and 64-bit machines, the fields m_rc and m_cs_sz store the next object in the deletion TODO list. These two fields together have 48-bits, and this is enough for modern computers. In 32-bit machines, the field m_rc is sufficient.

The field m_other is used to store the number of fields in a constructor object and the element size in a scalar array.

Fields

m_rc: c_intm_cs_sz: u16m_other: u8m_tag: u8

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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 type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.