Wednesday, December 8, 2010

Some Common Questions?

1) What is unaligned memory access?

Definition:
Unaligned memory accesses occur when you try to read N bytes of
data starting from an address that is not evenly divisible by N
(i.e. addr % N != 0). For example, reading 4 bytes of data
from address 0x10004 is fine, but reading 4 bytes of data from
address 0x10005 would be an unaligned memory access.

Fortunately things are not too complex, as in most cases, the
compiler ensures that things will work for you.

For more reading,
http://lwn.net/Articles/260456/

No comments: