aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/mgc0.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/mgc0.go')
-rw-r--r--src/pkg/runtime/mgc0.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/runtime/mgc0.go b/src/pkg/runtime/mgc0.go
index 496725f6a7..275c7ed676 100644
--- a/src/pkg/runtime/mgc0.go
+++ b/src/pkg/runtime/mgc0.go
@@ -34,3 +34,8 @@ func gc_unixnanotime(now *int64) {
sec, nsec := timenow()
*now = sec*1e9 + int64(nsec)
}
+
+func freeOSMemory() {
+ gogc(2) // force GC and do eager sweep
+ onM(&scavenge_m)
+}