This is the mail archive of the
mailing list for the GCC project.
question about allocating local variable
- From: Prawit Chaivong <arsenal_pui at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 28 Jun 2004 08:27:11 -0700 (PDT)
- Subject: question about allocating local variable
My question is...
I wrote the program like this.
And then compile to asm code I've got this line of
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.
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!