Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: c632692@csdeca.cs.missouri.edu (Vepa V Sirish)
Subject: Re: unaligned access
Date: 1995/05/24	[thread overview]
Message-ID: <3q0173$j09@news.missouri.edu> (raw)
In-Reply-To: 3plnvd$gks@chomolangma.expersoft.com

Adrian Wenden (adrian@expersoft.com) wrote:
: Can anyone help?

: I am running OSF 3.0 on an Alpha 400 and compiling using the native 5.0 C++ 
: compiler.

: A is concerned it is reconstructed correctly when it is returned from the
: the remote process, however when we attempt to use the object we get 
: 'Unaligned Access pid=<pid no> = <exe name> va=332e31386bde pc = 120179b9c
: ra = 120179b78 type = ldq. 

Hello  Adrian,
I can tell u what i do when I get the unaligned access messages. 
When u declare the variables in the main(), take care in declaring the
variables of the largest size first, and then declare the smaller ones
laters.
It might help to add a dummy variable like this

main()
double dummy ; /* force declarations of subsequent vars along the word
boundary */
then delclare the structures, the character buffers and then pointers
provided the structures are greater than 8 bytes and so are the character
buffers, and finally declare the integers and last the characters (they are
1 byte) .;

I have observed that when I do this,the mesg disappears. Also u will be
surprised in the manner in which the structure members are declared. Declare
the larger ones first and then the smaller ones
for example
struct XXX_fo {
		long x ;  /* 8 bytes */
		char *str ; /* 8 bytes */
		int	 some_no ; /*4 bytes */
		char c ; /* 1 byte */
	} ;

Do try rearranging the order in which the classes/structures are defineed
and I do feel there would be a drastic improvement. I work on a DEC Alpha
machine too and have observed the same problems
sirish

the message is generated because the alpha 64 accesses data structures along
64 bit word boudaries and is very particular about that . 

: Help:

: Has anyone had either, any experience of streaming 64-bit numbers across 
: the network or come across an unaligned access message, and can explain to
: me how I can determine what has become unaligned and how I could correct it?

: Many thanks

: Adrian Wenden



: adrian@expersoft.com
:  
: Expersoft Corporation
: San Diego, CA

: (619) 546 4100 x45

--
*******************************************************************************
Vepa V Sirish ,1205 University Av.,338 ,Columbia MO 65201,Ph (R) (314)-499-0855
           316 A&S Bldg, U of Missouri, Columbia MO 65211,Ph (O) (314)-882-7534
E-mail : sirish@csdeca.cs.missouri.edu, c632692@mizzou1.missouri.edu
*******************************************************************************



  parent reply	other threads:[~1995-05-24  4:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-05-20  4:00 unaligned access Adrian Wenden
1995-05-22  4:00 ` Eric Osborne
1995-05-24  4:00 ` Vepa V Sirish [this message]
1995-05-25  4:00 ` John Wood
  -- strict thread matches above, loose matches on Subject: below --
2003-03-06  6:27 Unaligned access Emmanuel STAPF [ISE]
2000-03-31  5:00 Kraisit Vittinanon
2000-04-04  4:00 ` Oisin McGuinness
1998-03-31  5:00 Allen M. Cohen
1998-04-01  5:00 ` Joe Mario
1996-11-15  5:00 unaligned access gautam
1996-11-16  5:00 ` Dirk Grunwald
1996-11-20  5:00 ` Jeff Denham
1996-11-22  5:00   ` Curt Smith
1996-11-21  5:00 ` Anthony Berent
1994-02-05 21:21 Stefan Monnier
1994-02-06  9:39 ` Jarkko Hietaniemi
1993-11-30 22:25 Roland Schemers
1993-11-30 23:25 ` Matt Thomas
1993-12-01 12:06 ` Burkhard Neidecker-Lutz
1993-12-07  1:27 ` Jim Hurst
1993-02-23 15:55 Unaligned access Byron Jennings
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