lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 7/23/07, Edwin Eyan Moragas <haaktu@gmail.com> wrote:
hi list,

i was looking at the source and i found this in luaconf.h:

#define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; }


i really don't understand the term 'alignment' as of yet.
tried looking for some kind of explanation of this in the net
to no avail.

anybody willing to explain this? links for resources would
also be greatly appreciated.

The wikipedia link mentioned by Jan is a good start. See also the IBM
article linked from there:
http://www-128.ibm.com/developerworks/library/pa-dalign/ for some
graphical illustrations that should help you understand alignment.
It's focusing a bit on PowerPC but the concepts are common to other
architectures.

--
Dirk