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
|
|
@ -643,7 +643,7 @@ func mdump() {
|
|||
for i := uintptr(0); i < uintptr(mheap_.nspan); i++ {
|
||||
s := h_allspans[i]
|
||||
if s.state == _MSpanInUse {
|
||||
mSpan_EnsureSwept(s)
|
||||
s.ensureSwept()
|
||||
}
|
||||
}
|
||||
memclr(unsafe.Pointer(&typecache), unsafe.Sizeof(typecache))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue