Trait pr47::vm::al31f::alloc::Alloc [−][src]
pub trait Alloc: 'static + Send + Sync {
unsafe fn add_stack(&mut self, stack: *const Stack);
unsafe fn remove_stack(&mut self, stack: *const Stack);
unsafe fn add_managed(&mut self, data: WidePointer);
unsafe fn mark_object(&mut self, data: WidePointer);
unsafe fn collect(&mut self);
fn set_gc_allowed(&mut self, allowed: bool);
}
Expand description
Abstract memory manager of AL31F
engine
Required methods
unsafe fn remove_stack(&mut self, stack: *const Stack)
unsafe fn remove_stack(&mut self, stack: *const Stack)
Remove one stack from Alloc
management
unsafe fn add_managed(&mut self, data: WidePointer)
unsafe fn add_managed(&mut self, data: WidePointer)
Make the object denoted by data
pointer managed
unsafe fn mark_object(&mut self, data: WidePointer)
unsafe fn mark_object(&mut self, data: WidePointer)
Mark the object denoted by data
as useful when it gets added into some container. This
method is used by tri-color GC.
fn set_gc_allowed(&mut self, allowed: bool)
fn set_gc_allowed(&mut self, allowed: bool)
Allow or disallow garbage collection