mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: consolidate h_allspans and mheap_.allspans
These are two ways to refer to the allspans array that hark back to when the runtime was split between C and Go. Clean this up by making mheap_.allspans a slice and eliminating h_allspans. Change-Id: Ic9360d040cf3eb590b5dfbab0b82e8ace8525610 Reviewed-on: https://go-review.googlesource.com/30530 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
This commit is contained in:
parent
adda7ad295
commit
4d6207790b
5 changed files with 42 additions and 31 deletions
|
|
@ -231,7 +231,7 @@ func CountPagesInUse() (pagesInUse, counted uintptr) {
|
|||
|
||||
pagesInUse = uintptr(mheap_.pagesInUse)
|
||||
|
||||
for _, s := range h_allspans {
|
||||
for _, s := range mheap_.allspans {
|
||||
if s.state == mSpanInUse {
|
||||
counted += s.npages
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue