Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: Byte/word/long alignment Message-ID: <38670@sun.uucp> Date: 13 Jan 88 01:32:48 GMT References: <4366@garfield.UUCP> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Distribution: na Organization: Sun Microsystems, Mountain View Lines: 14 Keywords: none In article <4366@garfield.UUCP> john13@garfield.UUCP (John Russell) writes: !>If I want to create an auto-initialized array of UBYTES, and then later !>access each 4 bytes as a longword, can I ensure that the array is longword !>aligned in some portable way (eg by placing it immediately after some other !>32-bit global variable)? Will some compilers re-arrange declared storage !>behind my back? The system call AllocMem() will guaruntee that the data is longword aligned. The only hitch being that you have to remember to free it before you exit. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.