docs: add doc-comments on GC-related methods

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-01-24 14:23:16 -08:00
parent 731518417e
commit f048a25938
5 changed files with 11 additions and 1 deletions

View File

@@ -59,6 +59,8 @@ type Stats interface {
//
// We can probably use this to inform a design for incremental GC by injecting
// callbacks to the set modification algorithms.
//
// https://en.wikipedia.org/wiki/Tracing_garbage_collection#Tri-color_marking
func Tricolor(roots []Node, refs func(ref Node) ([]Node, error)) (map[Node]struct{}, error) {
var (
grays []Node // maintain a gray "stack"