Mail Archives: cygwin/2002/01/27/01:12:20
Pepe Perez wrote:
> hello, before anything else I don't speak English, I am Argentinean,
> I am writing this with the help of a translator, so know how to
> excuse my language.
>
> Making a couple of tests with CYGWIN and the compiler GCC 2.95-3.5
> was with which I am reserved bad the memory. A char buffer[5] it
> occupies me 24 bytes!!!!!!!!!!. This checked it when seeing the
> exit assembler of this program:
>
> main () { char buffer[5]; }
>
> It is seen that it subtracts him 24 to ESP, when he would have to
subtract
> him 8. To that this is???
>
>> From already thank you!!
>
This is more likely a gcc issue than a cygwin one. Did you try the gcc
option -mpreferred-stack-boundary=2 ? This would suggest to gcc not to
attempt to maintain 16-byte alignment, which could be futile, as cygwin
binutils is set up to maintain only a 4-byte stack alignment. The
argument of -mpreferred-stack-boundary is log base 2 of the intended
stack alignment. gcc defaults to stack alignment of 16 with full
optimization, as observance of such alignments is required for code (on
P-II/P-III, but not P4) and for data objects larger than 8 bytes, in
order to obtain full performance. I understand that gcc is planning to
make 4-byte alignment the default for -Os, but that is a change
subsequent to gcc-2.95. 8-byte alignment is needed for reasonable
performance with data of type double, so people may wish to consider
over-riding the defaults, once they have a g++ library which doesn't break.
--
Tim Prince
tprince AT computer DOT org
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -