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
impl CardTable
pub const CARD_SHIFT: usize = 10usize
pub const CARD_SIZE: usize = 1_024usize
pub const CARD_CLEAN: u8 = 0u8
pub const CARD_DIRTY: u8 = 112u8
pub const CARD_AGED: u8 = 111u8
Sourcepub fn get_biased_begin(&self) -> *mut u8
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.
pub fn mem_map_begin(&self) -> *mut u8
pub fn mem_map_size(&self) -> usize
pub fn card_from_addr(&self, addr: *const u8) -> *mut u8
pub fn addr_from_card(&self, card_addr: *mut u8) -> *mut u8
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§
impl Freeze for CardTable
impl RefUnwindSafe for CardTable
impl !Send for CardTable
impl !Sync for CardTable
impl Unpin for CardTable
impl UnwindSafe for CardTable
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