Another Memory Alignment Question?

Posted by utxeeeee on Stack Overflow See other posts from Stack Overflow or by utxeeeee
Published on 2010-04-27T20:24:40Z Indexed on 2010/04/27 20:53 UTC
Read the original article Hit count: 154

Filed under:

I understand why data need to be aligned (and all the efforts made to accomplish it like padding) so we can reduce the number of memory accesses but this assumes that processor just can fetch addresses multiples of 4(supposing we are using a 32-bit architecture). And because of that assumption we need to align memory and my question is why we can just access addresses multiple of 4(efficiency, hardware restriction, another one)? Which is the advantages of doing this? Why cannot we access all the addresses available?

hugs

© Stack Overflow or respective owner

Related posts about memory