摘要: 方法一:#prama pack (n) // n取0, 1, 2, 4, 8, ... Struct S{ char c; int i; };#prama pack() //结束地址对齐方法二:struct S{ char c; int i;} __attribute__((packed));//GCC的__attribute__扩展机制告诉编译器取消特定结构体在编译过程中的优化对齐 阅读全文
posted @ 2012-11-25 14:52 wouldguan 阅读(631) 评论(0) 推荐(0) 编辑