enormouspenguin
2015-07-25 14:44:35 UTC
Hi,
In http://golang.org/pkg/sync/atomic/#pkg-note-BUG, I quoted:
"...The first word in a global variable or in an allocated struct or slice
can be relied upon to be 64-bit aligned..."
If I have an array of structs, are the first words of each and every
structs in the array automatically 64-bit aligned or just the first one? Do
I need to know the size of a word for each build target in order to make it
work correctly? If so, how can I programatically get the size?
Thanks very much!
In http://golang.org/pkg/sync/atomic/#pkg-note-BUG, I quoted:
"...The first word in a global variable or in an allocated struct or slice
can be relied upon to be 64-bit aligned..."
If I have an array of structs, are the first words of each and every
structs in the array automatically 64-bit aligned or just the first one? Do
I need to know the size of a word for each build target in order to make it
work correctly? If so, how can I programatically get the size?
Thanks very much!
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.