mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: rewrite lots of foo_Bar(f, ...) into f.bar(...)
Applies to types fixAlloc, mCache, mCentral, mHeap, mSpan, and mSpanList. Two special cases: 1. mHeap_Scavenge() previously didn't take an *mheap parameter, so it was specially handled in this CL. 2. mHeap_Free() would have collided with mheap's "free" field, so it's been renamed to (*mheap).freeSpan to parallel its underlying (*mheap).freeSpanLocked method. Change-Id: I325938554cca432c166fe9d9d689af2bbd68de4b Reviewed-on: https://go-review.googlesource.com/16221 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
58db5fc94d
commit
c17c42e8a5
11 changed files with 158 additions and 162 deletions
|
|
@ -3379,7 +3379,7 @@ func sysmon() {
|
|||
}
|
||||
// scavenge heap once in a while
|
||||
if lastscavenge+scavengelimit/2 < now {
|
||||
mHeap_Scavenge(int32(nscavenge), uint64(now), uint64(scavengelimit))
|
||||
mheap_.scavenge(int32(nscavenge), uint64(now), uint64(scavengelimit))
|
||||
lastscavenge = now
|
||||
nscavenge++
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue