#line 1555 "/home/travis/build/felix-lang/felix/src/packages/gc.fdoc"
  Generic garbage collector interface.
  This class provides a generic interface to the GC,
  that is, one that is independent of the GC representation.
  open class Gc
    fun _collect: unit -> size = "PTF gcp->actually_collect()"
      requires property "needs_gc";
    Invoke the garbage collector.
    proc collect() {
      if Env::getenv "FLX_REPORT_COLLECTIONS" != "" do
        eprintln "[Gc::collect] Program requests collection";
        var collected = _collect();
        eprintln$ "[Gc::collect] Collector collected " + collected.str + " objects";
    Get the total number of bytes currently allocated.
    fun gc_get_allocation_amt : unit -> size= "PTF gcp->collector->get_allocation_amt()"
      requires property "needs_gc";
    Get the total number of objects currently allocated.
    fun gc_get_allocation_count : unit -> size = "PTF gcp->collector->get_allocation_count()"
      requires property "needs_gc";
    Get the total number of roots.
    fun gc_get_root_count : unit -> size = "PTF gcp->collector->get_root_count()"
      requires property "needs_gc";
    proc add_root: address  = "PTF gcp->collector->add_root ($1);"
      requires property "needs_gc";
    proc remove_root: address  = "PTF gcp->collector->remove_root ($1);"
      requires property "needs_gc";