unsafe: document Sizeof() including "invisible overhead" #52018
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?1.x
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?N/A
What did you do?
I read the documentation for unsafe.Sizeof().
What did you expect to see?
The detail that Sizeof() includes overhead such as headers or alignment padding as I discovered from reading https://groups.google.com/g/golang-nuts/c/TFUoKFUi96A/m/qJmq3sdLCwAJ
What did you see instead?
No mention of these lower-level details other than the clarification that Sizeof() does not chase pointers.
The text was updated successfully, but these errors were encountered: