docs: add doc-comments on GC-related methods
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
2
gc/gc.go
2
gc/gc.go
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user