pub struct BlockAllocation<VM: VMBinding> {
space: UnsafeCell<*const ImmixSpace<VM>>,
lxr: UnsafeCell<*const LXR<VM>>,
nursery_blocks: BlockCache,
reused_blocks: BlockCache,
}Fields§
§space: UnsafeCell<*const ImmixSpace<VM>>§lxr: UnsafeCell<*const LXR<VM>>§nursery_blocks: BlockCache§reused_blocks: BlockCacheImplementations§
Source§impl<VM: VMBinding> BlockAllocation<VM>
impl<VM: VMBinding> BlockAllocation<VM>
pub fn new() -> Self
pub fn init(&self, space: &ImmixSpace<VM>, lxr: &'static LXR<VM>)
fn space(&self) -> &'static ImmixSpace<VM>
fn lxr(&self) -> &'static LXR<VM>
pub fn clean_nursery_mb(&self) -> usize
pub fn total_young_allocation_in_bytes(&self) -> usize
pub fn reset_block_mark_for_mutator_reused_blocks(&self, _pause: Pause)
pub fn sweep_mutator_reused_blocks(&self, pause: Pause)
Sourcepub fn sweep_nursery_blocks(
&self,
scheduler: &GCWorkScheduler<VM>,
pause: Pause,
)
pub fn sweep_nursery_blocks( &self, scheduler: &GCWorkScheduler<VM>, pause: Pause, )
Reset allocated_block_buffer and free nursery blocks.
fn parallel_sweep_all_nursery_blocks( &self, scheduler: &GCWorkScheduler<VM>, blocks: &[Atomic<Block>], )
Trait Implementations§
Source§impl<VM: VMBinding> ImmixHooks<VM> for BlockAllocation<VM>
impl<VM: VMBinding> ImmixHooks<VM> for BlockAllocation<VM>
Source§fn on_clean_block_acquired(&self, block: Block, copy: bool)
fn on_clean_block_acquired(&self, block: Block, copy: bool)
Called after a fresh clean block is acquired.
copy distinguishes
mutator vs. GC-copy allocation. The hook owns any plan-specific
per-block bookkeeping (e.g. nursery list, mark-table init).Source§fn on_reusable_block_acquired(&self, block: Block, copy: bool)
fn on_reusable_block_acquired(&self, block: Block, copy: bool)
Called after a reusable block is handed out to a mutator.
Source§fn cm_in_progress_or_final_mark(&self) -> bool
fn cm_in_progress_or_final_mark(&self) -> bool
Whether tracing is in progress; consulted on the mutator
reused-line fast path so newly handed-out lines can be marked.
impl<VM: VMBinding> Send for BlockAllocation<VM>
impl<VM: VMBinding> Sync for BlockAllocation<VM>
Auto Trait Implementations§
impl<VM> !Freeze for BlockAllocation<VM>
impl<VM> !RefUnwindSafe for BlockAllocation<VM>
impl<VM> Unpin for BlockAllocation<VM>
impl<VM> !UnwindSafe for BlockAllocation<VM>
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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§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