aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/heapdump.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2025-03-04 19:02:48 +0000
committerGopher Robot <gobot@golang.org>2025-04-23 08:00:33 -0700
commit528bafa0498bb26a3b3961fa5bf50d02bd7101bb (patch)
treeeb72406f4a0ce690d368b2377e2df031457775ca /src/runtime/heapdump.go
parentecdd429a3be7abde6e169b79da13bffdba064cb4 (diff)
downloadgo-528bafa0498bb26a3b3961fa5bf50d02bd7101bb.tar.xz
runtime: move sizeclass defs to new package internal/runtime/gc
We will want to reference these definitions from new generator programs, and this is a good opportunity to cleanup all these old C-style names. Change-Id: Ifb06f0afc381e2697e7877f038eca786610c96de Reviewed-on: https://go-review.googlesource.com/c/go/+/655275 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/heapdump.go')
-rw-r--r--src/runtime/heapdump.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go
index 6287cccd5f..6e6b58edd5 100644
--- a/src/runtime/heapdump.go
+++ b/src/runtime/heapdump.go
@@ -14,6 +14,7 @@ package runtime
import (
"internal/abi"
"internal/goarch"
+ "internal/runtime/gc"
"unsafe"
)
@@ -471,7 +472,7 @@ func dumproots() {
// Bit vector of free marks.
// Needs to be as big as the largest number of objects per span.
-var freemark [_PageSize / 8]bool
+var freemark [pageSize / 8]bool
func dumpobjs() {
// To protect mheap_.allspans.
@@ -483,7 +484,7 @@ func dumpobjs() {
}
p := s.base()
size := s.elemsize
- n := (s.npages << _PageShift) / size
+ n := (s.npages << gc.PageShift) / size
if n > uintptr(len(freemark)) {
throw("freemark array doesn't have enough entries")
}