runtime: refactor GC mark phase into gcMarkReachable

This is a small refactor to prepare GC marking for multithreaded
stop-the-world.
This commit is contained in:
Ayke van Laethem
2024-11-02 10:47:28 +01:00
parent 2599db2990
commit 8659b18d6f
3 changed files with 11 additions and 2 deletions
+5
View File
@@ -4,6 +4,11 @@ package runtime
import "internal/task"
func gcMarkReachable() {
markStack()
findGlobals(markRoots)
}
// markStack marks all root pointers found on the stack.
//
// This implementation is conservative and relies on the stack top (provided by