Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: problem with unaligned access on Alpha
Date: Tue, 29 Jun 1999 09:07:40 -0600 (MDT)	[thread overview]
Message-ID: <199906291507.JAA15833@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <c=US%a=_%p=delfland%l=MSMAIL-990629091248Z-340@msmail.energie-delfland.nl> from "Wessels, Hans" at Jun 29, 99 11:12:48 am

Wessels, Hans wrote:
> 
> On 25 juni 1999 Maciej W. Rozycki wrote:
> 
> > Using unions is good when you are sure all data is aligned.  If that's
> >not the case, the problem remains.  The "packed" approach is reasonable
> >but not necessarily the best.
....
> I am using the following macro to get alignment of elements in an
> malloced memory block:
[ snip ]

Aligning your own data is usually not a very big problem.  egcs does a
pretty good job with it by itself; sometimes too good. :-) But from time
to time you have to pick apart "alien" structures - like ethernet packet
headers, or file system descriptors, or you name it.  They have their
own layout and alignment requirements, which you cannot change, and one
has to be a bit careful not to run afoul of a compiler.

  Michal


  reply	other threads:[~1999-07-08 18:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-29  9:12 problem with unaligned access on Alpha Wessels, Hans
1999-06-29 15:07 ` Michal Jaegermann [this message]
1999-07-05 17:23   ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
1999-06-24  8:54 Christian Groessler
1999-06-24  8:29 Christian Groessler
1999-06-24 15:26 ` Michal Jaegermann
1999-06-23 10:23 Christian Groessler
1999-06-23 14:55 ` Maciej W. Rozycki
1999-06-23 14:56 ` Michal Jaegermann
1999-06-23 16:23   ` Maciej W. Rozycki
1999-06-24  7:02     ` Michal Jaegermann
1999-06-25 20:21       ` Maciej W. Rozycki
1999-06-22 10:59 Christian Groessler
1999-06-22 12:32 ` Stefan Katzenbeisser
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox