- 博客(2)
- 资源 (13)
- 收藏
- 关注
转载 Byte Alignment
Realtime systems consist of multiple processors communicating with each other via messages. For message communication to work correctly, the message formats should be defined unambiguously. In many sy
2008-03-04 00:38:00 1211
转载 关于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 1213 1
Understanding the Linux Kernel
2008-02-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人