#[repr(transparent)]pub struct Block(Address);
Expand description
Data structure to reference an immix block.
Tuple Fields§
§0: Address
Implementations§
source§impl Block
impl Block
sourcepub const DEFRAG_STATE_TABLE: SideMetadataSpec = crate::util::metadata::side_metadata::spec_defs::IX_BLOCK_DEFRAG
pub const DEFRAG_STATE_TABLE: SideMetadataSpec = crate::util::metadata::side_metadata::spec_defs::IX_BLOCK_DEFRAG
Block defrag state table (side)
sourcepub const MARK_TABLE: SideMetadataSpec = crate::util::metadata::side_metadata::spec_defs::IX_BLOCK_MARK
pub const MARK_TABLE: SideMetadataSpec = crate::util::metadata::side_metadata::spec_defs::IX_BLOCK_MARK
Block mark table (side)
sourcepub fn line_mark_table(&self) -> MetadataByteArrayRef<{ Block::LINES }>
pub fn line_mark_table(&self) -> MetadataByteArrayRef<{ Block::LINES }>
Get the address range of the block’s line mark table.
sourcepub fn get_state(&self) -> BlockState
pub fn get_state(&self) -> BlockState
Get block mark state.
sourcepub fn set_state(&self, state: BlockState)
pub fn set_state(&self, state: BlockState)
Set block mark state.
const DEFRAG_SOURCE_STATE: u8 = 255u8
sourcepub fn is_defrag_source(&self) -> bool
pub fn is_defrag_source(&self) -> bool
Test if the block is marked for defragmentation.
sourcepub fn set_as_defrag_source(&self, defrag: bool)
pub fn set_as_defrag_source(&self, defrag: bool)
Mark the block for defragmentation.
pub fn start_line(&self) -> Line
pub fn end_line(&self) -> Line
sourcepub fn lines(&self) -> RegionIterator<Line> ⓘ
pub fn lines(&self) -> RegionIterator<Line> ⓘ
Get the range of lines within the block.
sourcepub fn sweep<VM: VMBinding>(
&self,
space: &ImmixSpace<VM>,
mark_histogram: &mut [usize; 17],
line_mark_state: Option<u8>
) -> bool
pub fn sweep<VM: VMBinding>( &self, space: &ImmixSpace<VM>, mark_histogram: &mut [usize; 17], line_mark_state: Option<u8> ) -> bool
Sweep this block. Return true if the block is swept.
sourcepub fn clear_vo_bits_for_unmarked_regions(&self, line_mark_state: Option<u8>)
pub fn clear_vo_bits_for_unmarked_regions(&self, line_mark_state: Option<u8>)
Clear VO bits metadata for unmarked regions. This is useful for clearing VO bits during nursery GC for StickyImmix at which time young objects (allocated in unmarked regions) may die but we always consider old objects (in marked regions) as live.
Trait Implementations§
source§impl BlockMayHaveObjects for Block
impl BlockMayHaveObjects for Block
source§fn may_have_objects(&self) -> bool
fn may_have_objects(&self) -> bool
Return
true
if the block may contain valid objects (objects with the VO bit set). Return
false
otherwise. Read moresource§impl PartialEq for Block
impl PartialEq for Block
source§impl PartialOrd for Block
impl PartialOrd for Block
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Region for Block
impl Region for Block
source§fn from_aligned_address(address: Address) -> Self
fn from_aligned_address(address: Address) -> Self
Create a region from an address that is aligned to the region boundary. The method should panic if the address
is not properly aligned to the region. For performance, this method should always be inlined.
source§fn start(&self) -> Address
fn start(&self) -> Address
Return the start address of the region. For performance, this method should always be inlined.
source§fn from_unaligned_address(address: Address) -> Self
fn from_unaligned_address(address: Address) -> Self
Create a region from an arbitrary address.
source§fn is_aligned(address: Address) -> bool
fn is_aligned(address: Address) -> bool
Check if an address is aligned to the region.
source§fn end(&self) -> Address
fn end(&self) -> Address
Return the end address of the region. Note that the end address is not in the region.
source§fn containing(object: ObjectReference) -> Self
fn containing(object: ObjectReference) -> Self
Return the region that contains the object.
source§fn includes_address(&self, addr: Address) -> bool
fn includes_address(&self, addr: Address) -> bool
Check if the given address is in the region.
impl Copy for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more