File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -422,8 +422,7 @@ func runGC() (freeBytes uintptr) {
422422 }
423423
424424 // Mark phase: mark all reachable objects, recursively.
425- markStack ()
426- findGlobals (markRoots )
425+ gcMarkReachable ()
427426
428427 if baremetal && hasScheduler {
429428 // Channel operations in interrupts may move task pointers around while we are marking.
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ import (
88 "unsafe"
99)
1010
11+ func gcMarkReachable () {
12+ markStack ()
13+ findGlobals (markRoots )
14+ }
15+
1116//go:extern runtime.stackChainStart
1217var stackChainStart * stackChainObject
1318
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ package runtime
44
55import "internal/task"
66
7+ func gcMarkReachable () {
8+ markStack ()
9+ findGlobals (markRoots )
10+ }
11+
712// markStack marks all root pointers found on the stack.
813//
914// This implementation is conservative and relies on the stack top (provided by
You can’t perform that action at this time.
0 commit comments