To some, of course, especially to those high-priests over at the ACM. A quick examination of any code base of “real world” programs depressingly reveals that efficient design of structures is often overlooked, or not understood.
And, it should’ve been obvious to all but sufferers of a humor bypass operation that it was said in a lighthearted joking way, so chill already! ![:wink: :wink:](/images/emoji/twitter/wink.png?v=12)
-----Original Message-----
From: Chris Pearson [mailto:xxxxx@acm.org]
Sent: Wednesday, May 15, 2002 7:46 PM
To: NT Developers Interest List
Subject: [ntdev] RE: packing
It was bleedin’ obvious that “you should align all your data members natuarally if at all possible.”
----- Original Message -----
From: Paul Bunn
To: NT Developers Interest List
Sent: Tuesday, May 14, 2002 6:36 PM
Subject: [ntdev] RE: packing
Well, of course!
“Basil: Can’t we get you on Mastermind, Sybil? Next contestant Sybil Fawlty from Torquay, special subject stating the bleedin’ obvious.”
![:wink: :wink:](/images/emoji/twitter/wink.png?v=12)
-----Original Message-----
From: Mark Roddy [mailto:xxxxx@hollistech.com]
Sent: Tuesday, May 14, 2002 6:00 PM
To: NT Developers Interest List
Subject: [ntdev] RE: packing
Yes, but if the data structure is pre-defined, and does not conform to
the ‘natural alignment’, which happens a lot with embedded systems,
storage and network packet protocols, etc., you do have to use the
packing pragmas.
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Paul Bunn
> Sent: Tuesday, May 14, 2002 4:07 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: packing
>
>
> Note, you should align all your data members natuarally if at
> all possible. The reason for this is that moving data
> to/from unaligned destination causes a performance penalty.
> If you port to IA64 platform, the penalty is huge and would
> be a major concern if you are frequently moving to/from this
> structure. If you design a structure with natural alignment
> you get the bonus that you don’t have to use #pragma statements.
>
> Regards,
>
> Paul Bunn, UltraBac Software, 425-644-6000
> Microsoft MVP - Windows NT/2000/XP
> http://www.ultrabac.com
>
>
> -----Original Message-----
> From: Roddy, Mark [mailto:xxxxx@stratus.com]
> Sent: Tuesday, May 14, 2002 5:57 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: packing
>
>
> 1)
> #pragma push 1
> structure def
> #pragma pop
>
> 2) no, not if this is the intended use of this data object.
>
> > -----Original Message-----
> > From: Rajeev Rao [mailto:xxxxx@yahoo.co.in]
> > Sent: Tuesday, May 14, 2002 7:01 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] packing
> >
> >
> > Hi,
> > I have to write a given structure and sequence of
> > such structures to disk. I need to turn off packing
> > for this reason.
> >
> > 1. How do I set packing as 0 just for this structure
> >
> > 2. Am I limiting portability by doing this ?
—
You are currently subscribed to ntdev as: xxxxx@acm.org
To unsubscribe send a blank email to %%email.unsub%%
—
You are currently subscribed to ntdev as: xxxxx@ultrabac.com
To unsubscribe send a blank email to %%email.unsub%%