collect_garbage_raw

Function collect_garbage_raw 

Source
pub(crate) unsafe fn collect_garbage_raw(
    block: &mut Block<false>,
    root_set: &ThreadSafeRootSet,
    force: bool,
    next_limit: &mut usize,
)
Expand description

Perform garbage collection on a block with a root set without requiring a Context. This is useful for scenarios like ChannelManager where we need to GC a shared block from any thread without conflicting with thread-local Context singleton checks.

§Safety

Caller must ensure:

  1. Exclusive access to the block (no concurrent reads/writes)
  2. The root_set accurately represents all live references to objects in the block
  3. The block’s drop_stack and lisp_hashtables are properly maintained
  4. No active Context exists that references this block or root_set