[−][src]Struct cgc::space::Space
Fields
top: Address
limit: Address
pages: Vec<Page>
size: usize
size_limit: usize
page_size: usize
pages_count: usize
allocated_size: usize
Methods
impl Space
[src]
pub fn empty() -> Self
[src]
pub fn new(page_size: usize) -> Self
[src]
pub fn compute_size_limit(&mut self)
[src]
pub fn may_allocate_in_current(&mut self, size: usize) -> bool
[src]
pub fn add_page(&mut self, size: usize)
[src]
pub fn fast_allocate(&mut self, bytes: usize, needs_gc: &mut bool) -> Address
[src]
pub fn try_find_page_for(&self, size: usize) -> Option<(Address, Address)>
[src]
pub fn allocate(&mut self, bytes: usize, needs_gc: &mut bool) -> Address
[src]
pub fn swap(&mut self, space: &mut Space)
[src]
pub fn contains(&self, addr: Address) -> bool
[src]
pub fn reset_pages(&mut self)
[src]
pub fn clear(&mut self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Space
impl Send for Space
impl Sync for Space
impl Unpin for Space
impl UnwindSafe for Space
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,