mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: tidy GC driver
Change-Id: I0da26e89ae73272e49e82c6549c774e5bc97f64c Reviewed-on: https://go-review.googlesource.com/5331 Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
6e70fddec0
commit
2b655c0b92
4 changed files with 97 additions and 125 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue