aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mheap.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/mheap.go')
-rw-r--r--src/runtime/mheap.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go
index e8189547f8..a153df0733 100644
--- a/src/runtime/mheap.go
+++ b/src/runtime/mheap.go
@@ -671,7 +671,7 @@ func (h *mheap) grow(npage uintptr) bool {
}
atomic.Store(&s.sweepgen, h.sweepgen)
s.state = _MSpanInUse
- h.pagesInUse += uint64(npage)
+ h.pagesInUse += uint64(s.npages)
h.freeSpanLocked(s, false, true, 0)
return true
}