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 = 10
pub const CARD_SIZE: usize
pub const CARD_CLEAN: u8 = 0x0
pub const CARD_DIRTY: u8 = 0x70
pub const CARD_AGED: u8
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 UnsafeUnpin 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