Bright Leopold

i come from the other world,i will go back after the love,the regret,the alive and the dead are over

导航

2018年3月1日

struct 对齐和补齐原则

摘要: // 对齐原则:每一成员需对齐为后一成员类型的倍数 // 补齐原则:最终大小补齐为成员类型最大值的倍数 struct A { int a; // 4 short b; // (4) + 2 = 6 下一元素为 int,需对齐为 4 的倍数, 6 + (2) = 8 int c; // (8) + 4 阅读全文

posted @ 2018-03-01 10:41 Bright Leopold 阅读(820) 评论(0) 推荐(0) 编辑