pub trait UnstraddlableRegion: Region {
// Provided methods
fn containing(object: ObjectReference) -> Self { ... }
fn contains(&self, object: ObjectReference) -> bool { ... }
}Expand description
An unstraddlable region. No object can straddle (i.e. span over, overrlap with) more than one
UnstraddlableRegion. In other words, any object is either in the region or not in the
region.
For example, in crate::policy::immix::ImmixSpace, a crate::policy::immix::block::Block
is an unstraddlable region because objects cannot straddle multiple blocks. In contrast a
crate::policy::immix::line::Line is not an unstraddlable region because an object can
straddle multiple lines.
Because the raw address of a ObjectReference must be inside an object, an object is in an
UnstraddlableRegion if an only if the raw address of its ObjectReference is in the
UnstraddlableRegion.
Provided Methods§
Sourcefn containing(object: ObjectReference) -> Self
fn containing(object: ObjectReference) -> Self
Return the region that contains the object.
Sourcefn contains(&self, object: ObjectReference) -> bool
fn contains(&self, object: ObjectReference) -> bool
Reeturn whether a region contains an object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl UnstraddlableRegion for mmtk::policy::immix::block::Block
An objects cannot straddle multiple Immix blocks.
impl UnstraddlableRegion for mmtk::policy::marksweepspace::native_ms::block::Block
An objects cannot straddle multiple native blocks.