So let's say I have a struct that looks like this (pretty common in the real world, it turns out):
struct foo {
char[24] bar;
uint32_t fnord;
uint32_t quux;
}__attribute__((aligned(4));
What is the stride of bar
, that is, what is &bar[1] - &bar[0]
,
given that it's in struct foo
?
This has implications for sizeof(foo)
, which I'm pretty sure I wanted
to be 32, and I also wanted nice fast aligned operations on foo.fnord
and foo.quux
, or it wouldn't be aligned in the first place.