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

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

Required methods

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

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

fn get_plan(&self) -> &'static dyn Plan<VM = VM>[src]

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

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

Loading content...

Provided methods

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

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 MallocAllocator<VM>[src]

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

Loading content...