Re: Memory Allocation On Stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux