http://www.tapirgames.com/blog/golang-memory-alignment
On Friday, May 19, 2017 at 7:28:54 PM UTC+8, xjdrew wrote:
>
> Hello everyone,
>
>
> Code as below, playground url(https://play.golang.org/p/XSx--6uF0E):
>
> package main
>
>
> import "fmt"
> import "unsafe"
>
>
> type A struct {
> a uint8
>
* Marvin Renich [170523 08:58]:
> Looking more closely at the MSDN docs for FwpmFilterAdd0 and
> FWPM_FILTER0, if I were doing this, I might use «RawContext uint64»
> instead of «ProviderContextKey GUID», which would be properly aligned
> without manual padding. I would then
peterGo, thanks.
How can i use this kind of Go in windows? my machine is 64bit also. If I
download the amd64 Go, the pointer size will be 8 bytes.
My real issue is , when I call win32 api, uint64 type in the struct of
win32 is aligned to 8 bytes.
I have to pad the go struct by manual to make