gc

package
v1.0.0-alpha3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2017 License: Apache-2.0, CC-BY-SA-4.0 Imports: 0 Imported by: 0

Documentation

Overview

Package gc experiments with providing central gc tooling to ensure deterministic resource removal within containerd.

For now, we just have a single exported implementation that can be used under certain use cases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tricolor

func Tricolor(roots []string, all []string, refs func(ref string) []string) []string

Tricolor implements basic, single-thread tri-color GC. Given the roots, the complete set and a refs function, this returns the unreachable objects.

Correct usage requires that the caller not allow the arguments to change until the result is used to delete objects in the system.

It will allocate memory proportional to the size of the reachable set.

We can probably use this to inform a design for incremental GC by injecting callbacks to the set modification algorithms.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL