On Tue, Jul 13, 2021 at 1:29 PM Kristoffer Semelka <kseme...@gmail.com> wrote: > > I noticed that word sized datatypes can be stored directly in the data field > of an iface/eface, but I'm confused on how marking works with these kinds of > inline cases. I checked the mark routines in the runtime/gcmark.go and > couldn't find special casing for interfaces. How does the runtime know when > not to follow an interface's data pointer? Does it just scan that word > conservatively? How does the func's pointer map fit into this?
In the current implementations the data field of an interface value is always a pointer. It was once true that small scalar values were stored directly in interface values, but that is no longer true today. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVwXV8TC9HCw7BqYxhiM%2B%2BuzN1MpEtewC3B-17TkjW57g%40mail.gmail.com.