Crate zerogc_simple[][src]

Expand description

The simplest implementation of zerogc’s garbage collection.

Uses mark/sweep collection. This shares shadow stack code with the zerogc-context crate, and thus SimpleCollector is actually a type alias for that crate.

Internals

The internal layout information is public, and available through the (layout module)self::layout.

The garbage collector needs to store some dynamic type information at runtime, to allow dynamic dispatch to trace and drop functions. Each object’s GcHeader has two fields: a GcType and some internal mark data.

The mark data is implementation-internal. However, the header as a whole is repr(C) and the type information

Sometimes, users need to store their own type metadata for other purposes. TODO: Allow users to do this.

Modules

The in memory layout of objects using the simple collector.

Structs

The configuration for a garbage collection

Type Definitions

The id for a simple collector

A garbage collected pointer, allocated in the “simple” collector

A garbage collected array, allocated in the “simple” collector

A garbage colelcted vector, allocated in the “simple” collector

A “simple” garbage collector

The context of a simple collector