Struct SpaceBitmap

Source
pub struct SpaceBitmap<const ALIGN: usize> { /* private fields */ }

Implementations§

Source§

impl<const ALIGN: usize> SpaceBitmap<ALIGN>

Source

pub fn get_name(&self) -> &'static str

Source

pub fn set_name(&mut self, name: &'static str)

Source

pub fn heap_limit(&self) -> usize

Source

pub fn heap_begin(&self) -> usize

Source

pub fn set_heap_size(&mut self, bytes: usize)

Source

pub fn heap_size(&self) -> usize

Source

pub fn has_address(&self, obj: *const u8) -> bool

Source

pub fn size(&self) -> usize

Source

pub fn begin(&self) -> *mut Atomic<usize>

Source

pub fn index_to_offset(index: u64) -> u64

Source

pub fn offset_to_index(offset: usize) -> usize

Source

pub fn offset_bit_index(offset: usize) -> usize

Source

pub fn offset_to_mask(offset: usize) -> usize

Source

pub fn atomic_test_and_set(&self, obj: *const u8) -> bool

Source

pub fn test(&self, obj: *const u8) -> bool

Source

pub fn modify<const SET_BIT: bool>(&self, obj: *const u8) -> bool

Source

pub fn set(&self, obj: *const u8) -> bool

Source

pub fn clear(&self, obj: *const u8) -> bool

Source

pub fn compute_bitmap_size(capacity: u64) -> usize

Source

pub fn compute_heap_size(bitmap_bytes: u64) -> usize

Source

pub fn clear_range(&self, begin: *const u8, end: *const u8)

Source

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.

Source

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>

Source

pub fn create_from_memmap( name: &'static str, mem_map: MmapMut, heap_begin: *mut u8, heap_capacity: usize, ) -> SpaceBitmap<ALIGN>

Source

pub fn create( name: &'static str, heap_begin: *mut u8, heap_capacity: usize, ) -> SpaceBitmap<ALIGN>

Trait Implementations§

Source§

impl<const ALIGN: usize> Debug for SpaceBitmap<ALIGN>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

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> 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.