Struct gluon_vm::gc::Gc[][src]

pub struct Gc { /* fields omitted */ }

A mark and sweep garbage collector.

Methods

impl Gc
[src]

Constructs a new garbage collector

Allocates a new object. If the garbage collector has hit the collection limit a collection will occur.

Unsafe since roots must be able to traverse all accesible GcPtr values.

Allocates a new object.

Does a mark and sweep collection by walking from roots. This function is unsafe since roots need to cover all reachable object.

Marks the GcPtr Returns true if the pointer was already marked

Clears out any unmarked pointers and resets marked pointers.

Unsafe as it is up to the caller to make sure that all reachable pointers have been marked

Trait Implementations

impl Debug for Gc
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Gc

impl !Sync for Gc