Link to home
Start Free TrialLog in
Avatar of dn6
dn6

asked on

Number of bytes allocated for char arrays by subl %esp seems much too high (in linux 2.4, gcc 3.2.2)

Hi!

I noticed that when I declare a buffer of, for example, char[5], the assembly code generated by gcc actually allocates a much larger buffer, in this case 24 bytes:

subl $24, (%esp)

How can this be explained?
ASKER CERTIFIED SOLUTION
Avatar of grg99
grg99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of bbao
bbao
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes, it depends on type, processor, operating system and even compiler.
dn6, any feedback please?