Mail Archives: cygwin/1996/11/11/12:22:44
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: csrabak AT ipt DOT br
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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -