Enum mmtk::util::alloc::AllocatorInfo
source · #[repr(C, u8)]pub enum AllocatorInfo {
BumpPointer {
bump_pointer_offset: usize,
},
Unimplemented,
None,
}
Expand description
This type describes allocator information. It is used to
generate fast paths for the GC. All offset fields are relative to Mutator
.
Variants§
BumpPointer
Fields
§
bump_pointer_offset: usize
The byte offset from the mutator’s pointer to the crate::util::alloc::bumpallocator::BumpPointer
.
This allocator uses a crate::util::alloc::bumpallocator::BumpPointer
as its fastpath.
Unimplemented
This allocator uses a fastpath, but we haven’t implemented it yet.
None
This allocator does not have a fastpath.
Implementations§
source§impl AllocatorInfo
impl AllocatorInfo
sourcepub fn new<VM: VMBinding>(selector: AllocatorSelector) -> AllocatorInfo
pub fn new<VM: VMBinding>(selector: AllocatorSelector) -> AllocatorInfo
Return an AllocatorInfo for the given allocator selector. This method is provided so that VM compilers may generate allocator fast-path and load fields for the fast-path.
Arguments:
selector
: The allocator selector to query.
Trait Implementations§
source§impl Clone for AllocatorInfo
impl Clone for AllocatorInfo
source§fn clone(&self) -> AllocatorInfo
fn clone(&self) -> AllocatorInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AllocatorInfo
impl Debug for AllocatorInfo
source§impl Default for AllocatorInfo
impl Default for AllocatorInfo
source§fn default() -> AllocatorInfo
fn default() -> AllocatorInfo
Returns the “default value” for a type. Read more
source§impl Hash for AllocatorInfo
impl Hash for AllocatorInfo
source§impl Ord for AllocatorInfo
impl Ord for AllocatorInfo
source§fn cmp(&self, other: &AllocatorInfo) -> Ordering
fn cmp(&self, other: &AllocatorInfo) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for AllocatorInfo
impl PartialEq for AllocatorInfo
source§fn eq(&self, other: &AllocatorInfo) -> bool
fn eq(&self, other: &AllocatorInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AllocatorInfo
impl PartialOrd for AllocatorInfo
source§fn partial_cmp(&self, other: &AllocatorInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &AllocatorInfo) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for AllocatorInfo
impl Eq for AllocatorInfo
impl StructuralPartialEq for AllocatorInfo
Auto Trait Implementations§
impl RefUnwindSafe for AllocatorInfo
impl Send for AllocatorInfo
impl Sync for AllocatorInfo
impl Unpin for AllocatorInfo
impl UnwindSafe for AllocatorInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more