TragicJun的专栏

A little bit everyday

Byte Alignment

Realtime systems consist of multiple processors communicating with each other via messages. For message communication to work correctly, the message ...

2008-03-04 00:38:00

阅读数:810

评论数:0

关于C语言中的结构体对齐问题

1,比如:struct{short a1;short a2;short a3;}A;struct{long a1;short a2;}B;sizeof( A)=6, sizeof( B)=8,为什么?注:sizeof(short)=2,sizeof(long)=4因为:“成员对齐有一个重要的条件,...

2008-03-04 00:34:00

阅读数:767

评论数:1

提示
确定要删除当前文章?
取消 删除
关闭
关闭