pub struct SpaceBitmap<const ALIGN: usize> { /* private fields */ }
Implementations§
Source§impl<const ALIGN: usize> SpaceBitmap<ALIGN>
impl<const ALIGN: usize> SpaceBitmap<ALIGN>
pub fn get_name(&self) -> &'static str
pub fn set_name(&mut self, name: &'static str)
pub fn heap_limit(&self) -> usize
pub fn heap_begin(&self) -> usize
pub fn set_heap_size(&mut self, bytes: usize)
pub fn heap_size(&self) -> usize
pub fn has_address(&self, obj: *const u8) -> bool
pub fn size(&self) -> usize
pub fn begin(&self) -> *mut Atomic<usize>
pub fn index_to_offset(index: u64) -> u64
pub fn offset_to_index(offset: usize) -> usize
pub fn offset_bit_index(offset: usize) -> usize
pub fn offset_to_mask(offset: usize) -> usize
pub fn atomic_test_and_set(&self, obj: *const u8) -> bool
pub fn test(&self, obj: *const u8) -> bool
pub fn modify<const SET_BIT: bool>(&self, obj: *const u8) -> bool
pub fn set(&self, obj: *const u8) -> bool
pub fn clear(&self, obj: *const u8) -> bool
pub fn compute_bitmap_size(capacity: u64) -> usize
pub fn compute_heap_size(bitmap_bytes: u64) -> usize
pub fn clear_range(&self, begin: *const u8, end: *const u8)
Sourcepub fn visit_marked_range(
&self,
visit_begin: *const u8,
visit_end: *const u8,
visitor: impl FnMut(*mut HeapObjectHeader),
)
pub fn visit_marked_range( &self, visit_begin: *const u8, visit_end: *const u8, visitor: impl FnMut(*mut HeapObjectHeader), )
Visit marked bits in bitmap.
NOTE: You can safely change bits in this bitmap during visiting it since it loads word and then visits marked bits in it.
pub fn new( name: &'static str, mem_map: MmapMut, bitmap_begin: *mut usize, bitmap_size: usize, heap_begin: *mut u8, heap_capacity: usize, ) -> SpaceBitmap<ALIGN>
pub fn create_from_memmap( name: &'static str, mem_map: MmapMut, heap_begin: *mut u8, heap_capacity: usize, ) -> SpaceBitmap<ALIGN>
pub fn create( name: &'static str, heap_begin: *mut u8, heap_capacity: usize, ) -> SpaceBitmap<ALIGN>
Trait Implementations§
Auto Trait Implementations§
impl<const ALIGN: usize> Freeze for SpaceBitmap<ALIGN>
impl<const ALIGN: usize> !RefUnwindSafe for SpaceBitmap<ALIGN>
impl<const ALIGN: usize> !Send for SpaceBitmap<ALIGN>
impl<const ALIGN: usize> !Sync for SpaceBitmap<ALIGN>
impl<const ALIGN: usize> Unpin for SpaceBitmap<ALIGN>
impl<const ALIGN: usize> !UnwindSafe for SpaceBitmap<ALIGN>
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