数据对齐的奇怪问题
再32位arm下,下列数据结构在内核大下为20,在用户空间大小为24。请问为什么数据补齐的不一样。谢谢。
struct ip_conntrack_tuple
{
long long src;
struct {
u_int32_t ip;
union {
/* Add other protocols here. */
u_int16_t all;
struct {
u_int16_t port;
} tcp;
struct {
u_int16_t port;
} udp;
struct {
u_int8_t type, code;
} icmp;
} u;
u_int16_t protonum;
} dst;
};