Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site eagle.UUCP Path: utzoo!watmath!clyde!burl!ulysses!eagle!mjs From: mjs@eagle.UUCP (M.J.Shannon) Newsgroups: net.unix,net.lang.c Subject: Re: Portablity using structures and malloc - Help Message-ID: <1286@eagle.UUCP> Date: Thu, 18-Jul-85 13:22:55 EDT Article-I.D.: eagle.1286 Posted: Thu Jul 18 13:22:55 1985 Date-Received: Sat, 20-Jul-85 06:44:20 EDT References: <81@drux1.UUCP> Organization: AT&T Bell Laboratories, Summit, NJ Lines: 16 Xref: watmath net.unix:5067 net.lang.c:5652 > No first time guessers please! I need help. > > I've really been wondering about the way in which the UNIX 'C' compiler > handles structures and memory allocation across processors. > The compilers produced by AT&T pad structures as necessary to deal properly with alignment of members. The only guarantee made about structure members is that the (lexically) N+1th member will have an address larger than the Nth member. Further, malloc() returns a pointer suitable to be cast to the most strictly aligned aggregate, so you shouldn't be experiencing any problems (from the compiler at least). What problem are you experiencing? -- Marty Shannon UUCP: ihnp4!eagle!mjs Phone: +1 201 522 6063