From mboxrd@z Thu Jan 1 00:00:00 1970 From: netbeans at gatworks.com (U. George) Date: Thu, 22 May 2008 18:30:17 -0400 Subject: Getting rid of Unaligned Accesses (UA) In-Reply-To: References: <4835C12E.60905@hp.com> <4835C5D8.6070708@hp.com> Message-ID: <4835F3F9.6000707@gatworks.com> I suppose I should ask, why do u care? early cpu's could only store/fetch certain types ( int's/long's ) on aligned boundaries. fetching a byte, storing a byte, required an int/long fetch, and shifting. Overcoming such a problem, would mean expanding the byte storage into 4 byte, aligned on int boundaries. For structs, there is/was a pragma to force byte alignment, short alignment on int boundaries. You pay for this by wasted memory space. I think the 21264 cpu's can fetch/store bytes anywhere without faulting to external fixup routines.