Article View: comp.std.c
Article #1499Re: Structure Member Padding
From: Doug Gwyn
Date: Thu, 12 Jul 1990 21:00
Date: Thu, 12 Jul 1990 21:00
9 lines
1061 bytes
1061 bytes
In article <17069@haddock.ima.isc.com> karl@kelp.ima.isc.com (Karl Heuer) writes: >I don't get it. Why should a half-word of internal padding be necessary or >desirable? Looks to me like the obvious implementation is to make it a >two-word struct, with the first word containing s and a and b, and the second >word containing c and three pad bytes. What's the problem? On many, perhaps most, word-addressed architectures there are speed advantages to not trying to pack different small data types within the same word, unless bit fields are explicitly requested.
Technical Details
Message-ID:
<13345@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!ncifcrf!lhc!adm!smoke!gwynReferences:
<1990Jul7.225141.12002@sq.sq.com> <13321@smoke.BRL.MIL> <17069@haddock.ima.isc.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!ncifcrf!lhc!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Structure Member Padding Message-ID: <13345@smoke.BRL.MIL> Date: 12 Jul 90 21:00:24 GMT References: <1990Jul7.225141.12002@sq.sq.com> <13321@smoke.BRL.MIL> <17069@haddock.ima.isc.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9