summaryrefslogtreecommitdiff
path: root/src/runtime/mgc0.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/mgc0.go')
-rw-r--r--src/runtime/mgc0.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/runtime/mgc0.go b/src/runtime/mgc0.go
index cbf5e9cfd..38406f33a 100644
--- a/src/runtime/mgc0.go
+++ b/src/runtime/mgc0.go
@@ -28,7 +28,7 @@ func gc_unixnanotime(now *int64) {
func freeOSMemory() {
gogc(2) // force GC and do eager sweep
- onM(scavenge_m)
+ systemstack(scavenge_m)
}
var poolcleanup func()
@@ -76,10 +76,8 @@ func clearpools() {
}
}
-func gosweepone() uintptr
-func gosweepdone() bool
-
func bgsweep() {
+ sweep.g = getg()
getg().issystem = true
for {
for gosweepone() != ^uintptr(0) {