Source File
tagptr.go
Belonging Package
runtime
// Copyright 2023 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package runtime// taggedPointer is a pointer with a numeric tag.// The size of the numeric tag is GOARCH-dependent,// currently at least 16 bits.// This should only be used with pointers allocated outside the Go heap.type taggedPointer uint64// minTagBits is the minimum number of tag bits that we expect.const minTagBits = 16// # of bits we can steal from the bottom. We enforce that all pointers// that we tag are aligned to at least this many bits.// Currently the long pole in this tent is pollDesc at 280 bytes. Setting// 9 here rounds those structs up to 512 bytes.// gcBgMarkWorkerNode is also small, but we don't make many of those// so it is ok to waste space on them.const tagAlignBits = 9const tagAlign = 1 << tagAlignBits
![]() |
The pages are generated with Golds v0.7.9-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |