question about allocating local variable
Prawit Chaivong
arsenal_pui@yahoo.com
Mon Jun 28 15:27:00 GMT 2004
My question is...
I wrote the program like this.
void func()
{
char a[8];
}
And then compile to asm code I've got this line of
code.
.....
subl $8 %esp
.....
That makes sense, It moves stack pointer down 8 bytes
for local variable.
But the problem is, when I change size of array to 9
or 7 the asm code turn to this.
....
subl $24 %esp
....
It doesn't make any sense to me. Why it allocates 24
bytes for 9 or 7 bytes variable.
Does anybody has any explaination?
Thank in advance.
Prawit C.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
More information about the Gcc-help
mailing list