This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Memory Allocation On Stack


Pankaj Kohli writes:

 > I wrote a simple C program to test the memory allocation for local
 > variables. But when i try to disassemble the program using gdb, it
 > shows that 16 bytes are being reserved for local variables on the
 > stack, although i declared a single integer variable which is supposed
 > to take only 4 bytes.
 > Can anyone tell, why it is reserving 16 bytes on the stack for just a
 > single variable ?

This question was asked on the kernel list on May 19, 2007.  Please
find the answer at http://kerneltrap.org/node/8236

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]