diff options
Diffstat (limited to 'src/runtime/mheap.go')
-rw-r--r-- | src/runtime/mheap.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go index d082f8e622..ba800aacef 100644 --- a/src/runtime/mheap.go +++ b/src/runtime/mheap.go @@ -747,8 +747,10 @@ func mHeap_Scavenge(k int32, now, limit uint64) { } } -func scavenge_m() { - mHeap_Scavenge(-1, ^uint64(0), 0) +//go:linkname runtime_debug_freeOSMemory runtime/debug.freeOSMemory +func runtime_debug_freeOSMemory() { + startGC(gcForceBlockMode) + systemstack(func() { mHeap_Scavenge(-1, ^uint64(0), 0) }) } // Initialize a new span with the given start and npages. |