Closed ingvagabund closed 3 years ago
(1<<pallocChunksL2Bits - 1)
is expected to be uint
pallocChunksL2Bits = heapAddrBits - logPallocChunkBytes - pallocChunksL1Bits
logPallocChunkBytes = logPallocChunkPages + pageShift
logPallocChunkPages = 9
from go1.15.linux.amd64/src/runtime/malloc.go
:
heapAddrBits = (_64bit*(1-sys.GoarchWasm)*(1-sys.GoosDarwin*sys.GoarchArm64))*48 + (1-_64bit+sys.GoarchWasm)*(32-(sys.GoarchMips+sys.GoarchMipsle)) + 33*sys.GoosDarwin*sys.GoarchArm64
_64bit = 1 << (^uintptr(0) >> 63) / 2
const pageShift = _PageShift
from go1.15.linux.amd64/src/runtime/internal/sys/zgoarch_amd64.go
:
const GoosDarwin = 0
const GoarchArm64 = 0
const GoarchMipsle = 0
const GoarchMips = 0
const GoarchWasm = 0
from go1.15.linux.amd64/src/runtime/sizeclasses.go
:
const _PageShift = 13
from go1.15.linux.amd64/src/runtime/mpagealloc_64bits.go
:
const pallocChunksL1Bits = 13
Reproduced by running:
Parsing error logged:
Code snippet (from
go1.15.linux.amd64/src/runtime/mpagealloc.go
):