From: jtk@atria.com (John T. Kohl)
Subject: Re: HELP!! : Unaligned access error on DEC Alpha, $OS == osf1
Date: Mon, 8 Nov 1993 15:32:32 GMT [thread overview]
Message-ID: <CG6J69.1rt@atria.com> (raw)
In-Reply-To: jacobj@research.CS.ORST.EDU's message of 8 Nov 93 12:50:10 GMT
In article <2blfa2INN4sq@flop.ENGR.ORST.EDU> jacobj@research.CS.ORST.EDU (Joseph Jacob) writes:
> when we try to run the program.
> we found that it is coming at the following lines of code
> temp = (struct NODE *)( mem_space+1);
> temp->next= (struct NODE *)NULL ;
> ...
> where temp is defined as struct NODE *temp;
> struct NODE {
> struct NODE *next ;
> ...
> mem_space is defined as
> int *mem_space ;
Yep, that'll do it. If mem_space is an integer pointer, as you
indicated, it will be aligned on a 4-byte boundary. Pointers must be
aligned on 8-byte boundaries to avoid unaligned access problems. It's
likely that mem_space itself is 8-byte aligned, so that mem_space+1 is
only 4-byte aligned, hence the problems you see.
--
John Kohl <jtk@atria.com> or <jtkohl@mit.edu>
working for but not representing: Atria Software
---------
What are you pretending not to know?
next prev parent reply other threads:[~1993-11-08 15:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-11-08 12:50 HELP!! : Unaligned access error on DEC Alpha, $OS == osf1 Joseph Jacob
1993-11-08 15:32 ` John T. Kohl [this message]
1993-11-08 20:22 ` John T. Kohl
1993-11-09 12:29 ` acssysdsc
1993-11-09 20:26 ` Karen Kolling
1993-11-09 20:45 ` Karen Kolling
1993-11-10 15:06 ` Ken Cowan
1993-11-09 4:26 ` Karen Kolling
1993-11-09 17:06 ` Bruce O'Neel
1993-11-09 23:06 ` HELP!! : Unaligned access error on DEC John Lovell
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