Function mmtk::memory_manager::enable_collection [−][src]
pub fn enable_collection<VM: VMBinding>(
mmtk: &'static MMTK<VM>,
tls: OpaquePointer
)
Allow MMTk to trigger garbage collection. A VM should only call this method when it is ready for the mechanisms required for collection during the boot process. MMTk will invoke Collection::spawn_worker_thread() to create GC threads during this funciton call.
Arguments:
mmtk
: A reference to an MMTk instance.tls
: The thread that wants to enable the collection. This value will be passed back to the VM in Collection::spawn_worker_thread() so that the VM knows the context.