Struct CardTable

Source
pub struct CardTable { /* private fields */ }
Expand description

Maintain a card table from the the write barrier. All writes of non-null values to heap addresses should go through an entry in WriteBarrier, and from there to here.

Implementations§

Source§

impl CardTable

Source

pub const CARD_SHIFT: usize = 10usize

Source

pub const CARD_SIZE: usize = 1_024usize

Source

pub const CARD_CLEAN: u8 = 0u8

Source

pub const CARD_DIRTY: u8 = 112u8

Source

pub const CARD_AGED: u8 = 111u8

Source

pub fn get_biased_begin(&self) -> *mut u8

Returns a value that when added to a heap address >> CARD_SHIFT will address the appropriate card table byte. For convenience this value is cached in every local heap.

Source

pub fn mem_map_begin(&self) -> *mut u8

Source

pub fn mem_map_size(&self) -> usize

Source

pub fn card_from_addr(&self, addr: *const u8) -> *mut u8

Source

pub fn addr_from_card(&self, card_addr: *mut u8) -> *mut u8

Source

pub fn modify_cards_atomic( &self, scan_begin: *mut u8, scan_end: *mut u8, visitor: impl FnMut(u8) -> u8, modified: impl FnMut(*mut u8, u8, u8), )

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.