Re: Newbie doubts about stack !

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

 



On Sun, Sep 15, 2002 at 05:20:05PM +0100, James Stevenson wrote:
> > > >     33 - 48    =   56
> > > >     49 - 64    =   72
> > > >
> > > > Can anybody please explain me ,
> > > > what is the reason behind this ?
> > > >
> > > > Why is it that only the required
> > > > amount of stack is not allocated ?
> > >
> > > compilers tend to optimize by keeping the stack aligned
> > > on certin boundries and also some machines always require
> > > that say the stack point must always be on a quad word
> > > boundry. Do you actually use the variable at all ?
> > > a really simple compliler optimizeation is to remove anything that
> > > is not referenced even when you dont use and optimizeation flags.
> >
> > One question remains. What are the 8 extra bytes for?
> 
> 2 pointers are stored around there at the start of the stack
> a frame pointer and a pointer to the old stack frame i think.

Well, probably yes. Can be tested using --fomit-frame-pointer compiler
flag. I was just puzzled by the first line, which stated it's only 4 for
lengs 0 - 4. I might have as well be a typo...

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux