Subject: Re: Question
To: Lennart Augustsson <augustss@cs.chalmers.se>
From: Matthew Jacob <mjacob@feral.com>
List: port-alpha
Date: 12/10/1998 09:27:58
On Thu, 10 Dec 1998, Lennart Augustsson wrote:

> 
> > Oh- I didn't mean to sound critical... The point here is that you don't
> > control what the compiler does for structure padding and alignment. If you
> > *do* have a structure that 'just works' great- if you don't (and I guess
> > that you don't if you're getting alignment faults- or have I been a real
> > bonehead here?)- then you have to have something that will do the
> > structure translation for you (XDR).
> I'm pretty sure it works fine as long as the struct starts at an
> aligned address.  My worries were for the case when it doesn't.
> 

Where you are you getting the structures from? malloc? I dunno if NetBSD
kernel malloc guarantees alignment (it probably ought to- I note you alloc
M_USB class memory, but also M_TEMP- is that where alignment could be
controlled?)