delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/11/11/12:22:44

From: csrabak AT dce03 DOT ipt DOT br (Cesar Scarpini Rabak)
Subject: Re: FW: Re: wxwin port
11 Nov 1996 12:22:44 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <1.5.4.16.19961111125433.379f9d86.cygnus.gnu-win32@dmeasc.rc.ipt.br>
Mime-Version: 1.0
X-Sender: csrabak AT dmeasc DOT rc DOT ipt DOT br
X-Mailer: Windows Eudora Light Version 1.5.4 (16)
Original-To: Fabio Somenzi <fabio AT joplin DOT colorado DOT edu>, gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019