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:
Austin Clements 2016-10-04 15:51:31 -04:00
parent adda7ad295
commit 4d6207790b
5 changed files with 42 additions and 31 deletions

View file

@ -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
}