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>
This commit is contained in:
Michael Anthony Knyszek 2025-03-04 19:02:48 +00:00 committed by Gopher Robot
parent ecdd429a3b
commit 528bafa049
17 changed files with 110 additions and 98 deletions

View file

@ -49,6 +49,7 @@ package runtime
import (
"internal/runtime/atomic"
"internal/runtime/gc"
"unsafe"
)
@ -58,7 +59,7 @@ const (
pallocChunkPages = 1 << logPallocChunkPages
pallocChunkBytes = pallocChunkPages * pageSize
logPallocChunkPages = 9
logPallocChunkBytes = logPallocChunkPages + pageShift
logPallocChunkBytes = logPallocChunkPages + gc.PageShift
// The number of radix bits for each level.
//