Enum mmtk::util::options::NurserySize
source · pub enum NurserySize {
Bounded {
min: usize,
max: usize,
},
ProportionalBounded {
min: f64,
max: f64,
},
Fixed(usize),
}
Expand description
An option that provides a min/max interface to MMTk and a Bounded/Fixed interface to the user/VM.
Variants§
Bounded
Fields
min: usize
The lower bound of the nursery size in bytes. Default to DEFAULT_MIN_NURSERY
.
max: usize
The upper bound of the nursery size in bytes. Default to DEFAULT_MAX_NURSERY
.
A Bounded nursery has different upper and lower bounds. The size only controls the upper bound. Hence, it is considered to be a “variable size” nursery.
ProportionalBounded
Fields
min: f64
The lower bound of the nursery size as a proportion of the current heap size. Default to DEFAULT_PROPORTIONAL_MIN_NURSERY
.
max: f64
The upper bound of the nursery size as a proportion of the current heap size. Default to DEFAULT_PROPORTIONAL_MAX_NURSERY
.
A bounded nursery that is porportional to the current heap size.
Fixed(usize)
A Fixed nursery has the same upper and lower bounds. The size controls both the upper and lower bounds. Note that this is considered less performant than a Bounded nursery since a Fixed nursery size can be too restrictive and cause more GCs.
Implementations§
Trait Implementations§
source§impl Clone for NurserySize
impl Clone for NurserySize
source§fn clone(&self) -> NurserySize
fn clone(&self) -> NurserySize
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NurserySize
impl Debug for NurserySize
source§impl FromStr for NurserySize
impl FromStr for NurserySize
impl Copy for NurserySize
Auto Trait Implementations§
impl RefUnwindSafe for NurserySize
impl Send for NurserySize
impl Sync for NurserySize
impl Unpin for NurserySize
impl UnwindSafe for NurserySize
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
§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>
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>
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)
&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)
&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>
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>
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