[][src]Struct cgc::space::Space

pub struct Space {
    pub top: Address,
    pub limit: Address,
    pub pages: Vec<Page>,
    pub size: usize,
    pub size_limit: usize,
    pub page_size: usize,
    pub pages_count: usize,
    pub allocated_size: usize,
}

Fields

top: Addresslimit: Addresspages: Vec<Page>size: usizesize_limit: usizepage_size: usizepages_count: usizeallocated_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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.