Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!unmvax!pprg.unm.edu!topgun.dspo.gov!lanl!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: sizeof struct Keywords: sizeof struct Message-ID: <10959@smoke.BRL.MIL> Date: 7 Sep 89 04:15:08 GMT References: <29722@pbhya.PacBell.COM> <7622@cg-atla.UUCP> <14529@haddock.ima.isc.com> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <14529@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >In this particular case, the processor doesn't require any special alignment >for the structure in question, but the implementation pads it anyway. (As is >its right, silly though it may be.) It's not a bug, just a misfeature. It's not necessarily silly. When the first VAX C compiler was implemented, the implementors decided to longword-align such things even though the VAX is byte-addressable. It made typical programs run faster on the only model available at that time (VAX-11/780). That was due to the operation of the memory buffer cache.