Closed derlaft closed 1 year ago
@derlaft Report states the amount of object bytes that GC has to scan for pointers. With the following:
type structB struct {
a net.IP
b uint8
}
GC would scan first 8 bytes for pointers (net.IP type) and immediately stop upon reaching uint8 type.
Thanks a lot!
btw is there an article (or anything similar) that I could read about that effect on GC? would be interesting to know more details, but so far cannot find anything
Yes, actually Vincent has an excellent blog series on Golang GC, but it's also mentioned I guess everywhere including official GC Guide.
Given the code:
betteralign
suggests to realign:However, that makes no difference: