[][src]Trait mmtk::util::alloc::allocator::Allocator

pub trait Allocator<VM: VMBinding>: Downcast {
    pub fn get_tls(&self) -> OpaquePointer;
pub fn get_space(&self) -> Option<&'static dyn Space<VM>>;
pub fn get_plan(&self) -> &'static SelectedPlan<VM>;
pub fn alloc(&mut self, size: usize, align: usize, offset: isize) -> Address;
pub fn alloc_slow_once(
        &mut self,
        size: usize,
        align: usize,
        offset: isize
    ) -> Address; pub fn alloc_slow(
        &mut self,
        size: usize,
        align: usize,
        offset: isize
    ) -> Address { ... }
pub fn alloc_slow_inline(
        &mut self,
        size: usize,
        align: usize,
        offset: isize
    ) -> Address { ... } }

Required methods

pub fn get_tls(&self) -> OpaquePointer[src]

pub fn get_space(&self) -> Option<&'static dyn Space<VM>>[src]

pub fn get_plan(&self) -> &'static SelectedPlan<VM>[src]

pub fn alloc(&mut self, size: usize, align: usize, offset: isize) -> Address[src]

pub fn alloc_slow_once(
    &mut self,
    size: usize,
    align: usize,
    offset: isize
) -> Address
[src]

Loading content...

Provided methods

pub fn alloc_slow(
    &mut self,
    size: usize,
    align: usize,
    offset: isize
) -> Address
[src]

pub fn alloc_slow_inline(
    &mut self,
    size: usize,
    align: usize,
    offset: isize
) -> Address
[src]

Loading content...

Implementations

impl<VM> dyn Allocator<VM> where
    VM: Any + 'static,
    VM: VMBinding
[src]

pub fn is<__T: Allocator<VM>>(&self) -> bool[src]

Returns true if the trait object wraps an object of type __T.

pub fn downcast<__T: Allocator<VM>>(
    self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
[src]

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn't.

pub fn downcast_rc<__T: Allocator<VM>>(
    self: Rc<Self>
) -> Result<Rc<__T>, Rc<Self>>
[src]

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn't.

pub fn downcast_ref<__T: Allocator<VM>>(&self) -> Option<&__T>[src]

Returns a reference to the object within the trait object if it is of type __T, or None if it isn't.

pub fn downcast_mut<__T: Allocator<VM>>(&mut self) -> Option<&mut __T>[src]

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn't.

Implementors

impl<VM: VMBinding> Allocator<VM> for LargeObjectAllocator<VM>[src]

impl<VM: VMBinding> Allocator<VM> for BumpAllocator<VM>[src]

Loading content...