* gcc optimization and stack allocation.
@ 2004-06-17 8:49 Yang Ye
2004-06-17 9:25 ` Falk Hueffner
0 siblings, 1 reply; 2+ messages in thread
From: Yang Ye @ 2004-06-17 8:49 UTC (permalink / raw)
To: gcc-help; +Cc: 'wei lei'
Hi,
Do you have any idea on this scenario:
When gcc(3.3.3) allocating space for local varibles, e.g. a statement like
'char buf[256];', the allocated buffers in stack always come with some
space filled in at the end. If choose higher optimization level, let's say
gcc -O6, the spaced filled at the end are smaller. I searched quite a lot
documents, cannot find the official reason.
Yang Ye
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gcc optimization and stack allocation.
2004-06-17 8:49 gcc optimization and stack allocation Yang Ye
@ 2004-06-17 9:25 ` Falk Hueffner
0 siblings, 0 replies; 2+ messages in thread
From: Falk Hueffner @ 2004-06-17 9:25 UTC (permalink / raw)
To: Yang Ye; +Cc: gcc-help, 'wei lei'
"Yang Ye" <leafyoung@yahoo.com> writes:
> Do you have any idea on this scenario: When gcc(3.3.3) allocating
> space for local varibles, e.g. a statement like 'char buf[256];',
> the allocated buffers in stack always come with some space filled in
> at the end. If choose higher optimization level, let's say gcc -O6,
> the spaced filled at the end are smaller. I searched quite a lot
> documents, cannot find the official reason.
There is no "official reason". This depends on various gcc internals
in a hard to predict way. The real question is: why do you care?
--
Falk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-17 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17 8:49 gcc optimization and stack allocation Yang Ye
2004-06-17 9:25 ` Falk Hueffner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).