2 ms·
It's up to the low-level code to stay within taggedPointerBits, and the value is arch-dependent. For netpoll, it looks to be just a cyclic epoch counter, so th
by yencabulator 3y ago
It's up to the low-level code to stay within taggedPointerBits, and the value is arch-dependent.
For netpoll, it looks to be just a cyclic epoch counter, so the size doesn't really matter: https://github.com/golang/go/blob/4956c3437bd2f4448bcec51321f123d03731ddfc/src/runtime/netpoll.go#L299 https://github.com/golang/go/blob/4956c3437bd2f4448bcec51321...
For use in malloc, it's assumed to be >=10 and verified at init:
https://github.com/golang/go/blob/4956c3437bd2f4448bcec51321f123d03731ddfc/src/runtime/malloc.go#L449 https://github.com/golang/go/blob/4956c3437bd2f4448bcec51321...