Data structure alignment: Difference between revisions

Content deleted Content added
No edit summary
Line 12:
A memory pointer that refers to primitive data that is ''n'' bytes long is said to be ''aligned'' if it is only allowed to contain addresses that are ''n''-byte aligned, otherwise it is said to be ''unaligned''. A memory pointer that refers to a data aggregate (a data structure or array) is ''aligned'' if (and only if) each primitive [[Data (computing)|datum]] in the aggregate is aligned.
 
Note that the definitions above assume that each primitive [[Data (computing)|datum]] is an even power of two bytes long. When this is not the case (as with 80-bit floating-point on x86) the context influences the conditions where the [[Data (computing)|datum]] is considered aligned or not.
 
== Problems ==