Subject: Re: FW: Re: wxwin port
From: [email-masked] (Cesar Scarpini Rabak)

11 Nov 1996 12:22:44 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked]
X-Mailer: Windows Eudora Light Version 1.5.4 (16)
Original-To: Fabio Somenzi <[email-masked]>, [email-masked]
Original-Sender: [email-masked]

At 04:19 10/11/96 -0700, Fabio Somenzi wrote:
>->Does anyone have any input on why 16 bytes from gnu-win32 and
>->14 for other compiler
>
>I believe it's because gcc enforces alignment. The two extra bytes are
>not used. I've seen it done by other compilers as well.
>
>In some applications alignment is important. For instance, a 16-byte
>structure can be aligned with the boundaries of the cache lines.
>
>Alignment may also have to do with the memory manager (reducing the
>number of buckets,) but I'm not familiar with this aspect of gcc.
>
>There may be a gcc option to enforce structure packing, but memory may
>fail me here.
>

It is not an option for the command line of gcc but rather an extension 
of C language by GNU. Look in the docs for: "__attribute__((packed))"

[snipped]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: [email-masked]
DME/ASC                                   Phone: 55-11-268-35221Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".