Struct lean_sys::lean_object
source · #[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_int
§m_cs_sz: u16
§m_other: u8
§m_tag: u8
Trait Implementations§
source§impl Clone for lean_object
impl Clone for lean_object
source§fn clone(&self) -> lean_object
fn clone(&self) -> lean_object
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more