bytes allignment

Data structure alignment is the way data is arranged and accessed in computer memory. It consists of two separate but related issues: data alignment and data structure padding. When a modern computer reads from or writes to a memory address, it will do this in word sized chunks (e.g. 4 byte chunks on a 32-bit system). Data alignment means putting the data at a memory offset equal to some multiple of the word size, which increases the system's performance due to the way the CPU handles memory. To align the data, it may be necessary to insert some meaningless bytes between the end of the last data structure and the start of the next, which is data structure padding.


数据结构对齐数据的安排和在计算机的内存访问方式。 它由两个单独但相关的问题: 数据对齐数据结构填充 。 当现代计算机读取或写入到一个内存地址,它会在这个 (例如4字节的块,在32位系统)大小的块,数据对齐意味着将在内存中的数据等于多个部分抵消字的大小,从而提高系统的性能由于CPU处理内存的方式。 要对齐的数据,它可能需要一些毫无意义的字节之间插入的最后一个数据结构和未来的开始,这是数据结构的填充。



http://news.boxuu.com/news/2010-8-23/79475_16.html


http://men.yoka.com/fun/women/2011/pic060836312.shtml

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值