‪On Thu, Mar 21, 2024 at 4:47 PM ‫محمد بومنذر‬‎
<mohammed.bu...@gmail.com> wrote:‬
>
> I have been following the Go Runtime and Compiler team meeting notes for a 
> while. In the recent notes, I noticed something that got my attention 
> regarding memory layout optimization for structures.
> https://github.com/golang/go/issues/43930#issuecomment-2009816508
>
> I'm working on some code that interfaces with C libraries without directly 
> utilizing the CGo tool (for portability reasons). Currently, I'm adding 
> padding fields manually for C structs like
> struct {a int32; _ [4]byte}
>
> Would this behavior be affected?

Exactly because of this concern there is a proposal https://go.dev/issue/66408.

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/CAOyqgcVvNcm-ojeG7gt1O47UpcZK2be3k13WfrnSbO5ZpLvcTg%40mail.gmail.com.

Reply via email to