pub struct CardTable { /* private fields */ }Expand description
Card-based write barrier for large heaps
Divides the heap into cards and tracks which cards contain cross-generational references
Implementations§
Source§impl CardTable
impl CardTable
pub fn new(heap_start: *const u8, heap_size: usize, card_size: usize) -> Self
Sourcepub fn mark_card_dirty(&self, address: *const u8)
pub fn mark_card_dirty(&self, address: *const u8)
Mark a card as dirty due to a cross-generational reference
Sourcepub fn get_dirty_cards(&self) -> Vec<usize>
pub fn get_dirty_cards(&self) -> Vec<usize>
Get all dirty cards for scanning
Sourcepub fn clear_dirty_cards(&self)
pub fn clear_dirty_cards(&self)
Clear all dirty cards (typically after scanning)
Sourcepub fn card_to_address_range(
&self,
card_index: usize,
) -> Option<(*const u8, *const u8)>
pub fn card_to_address_range( &self, card_index: usize, ) -> Option<(*const u8, *const u8)>
Convert a card index to an address range
Sourcepub fn stats(&self) -> CardTableStats
pub fn stats(&self) -> CardTableStats
Get card table statistics
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