From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8aa51189d42a66a4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-11-09 13:06:30 PST Newsgroups: comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!concert!decwrl!adobe!kolling From: kolling@adobe.com (Karen Kolling) Subject: Re: HELP!! : Unaligned access error on DEC Alpha, $OS == osf1 Message-ID: <1993Nov9.202614.1396@adobe.com> Sender: usenet@adobe.com (USENET NEWS) Organization: Adobe Systems Incorporated, Mountain View References: <1993Nov9.072931.639@acs.eku.edu> Date: Tue, 9 Nov 1993 20:26:14 GMT In article <1993Nov9.072931.639@acs.eku.edu> acssysdsc@acs.eku.edu writes: >In article , jtk@atria.com (John T. Kohl) writes: >> In article , I wrote: >> >>> Pointers must be >>> aligned on 8-byte boundaries to avoid unaligned access problems. >> >> Let me rephrase that to make sure it's not misleading. _Storage_ for >> pointers must be aligned on 8-byte boundaries. To avoid unaligned >> access problems, pointer _values_ need to be aligned to the natural >> alignment of the item to which they point. >> -- > >So what does he have to do to fix it? Does C have an align statement or >directive? I don't think so. If he's storing just 64 bit items, and ignoring for the moment that "+1", he could just defined mem_space as a pointer to any 64 bit item instead of int. I don't know what the +1 is for -- maybe it's a count of used space or somesuch and can be set up separately, or he could point mem_space at a struct of an int and a 64 bit item. Or maybe it itself should actually be 64 bits long and not an int (if, for example, it's for a pointer to free space). Or maybe he's storing items of varying sizes in mem_space and really needs to manage the space... -- Karen Kolling kolling@adobe.com or kolling@netcom.com ^._.^ ^._.^ ^._.^ ^._.^ ^._.^ ^._.^ ^._.^ ^._.^ ^._.^ ^._.^