Re: N00b questions :\
From: Janus N. (janus_at_bananus.dk)
Date: 05/25/03
- Previous message: northern snowfall: "Re: N00b questions :\"
- In reply to: northern snowfall: "Re: N00b questions :\"
- Next in thread: northern snowfall: "Re: N00b questions :\"
- Reply: northern snowfall: "Re: N00b questions :\"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: northern snowfall <dbailey27@ameritech.net> Date: 25 May 2003 03:28:10 +0200
On Sun, 2003-05-25 at 03:42, northern snowfall wrote:
> >GCC sometimes allocates more memory for each variable on the stack than
> >is actually requested. I have no idea exactly why and what is does --
> >but I assume it is some small optimization.
> >
> FYI, compilers (are supposed to) align memory to the requirement of the
> underlying architecture. Most processors will throw an alignment_error
> exception if an opcode attempts to pass an unaligned address to it.
> This is done simply by padding the stack so that each auto variable is
> given a properly aligned memory address.
Oh yeah ... true. But isn't this 32-bit on the ia32? GCC 3.x allocates
way more than is neccessary to have it aligned. The vulndev-2 buffer of
90 bytes should be 92 right? But gcc allocates 108. Why does it do this
extra padding then?
Janus
-- Janus N. Tøndering <janus@bananus.dk>
- Previous message: northern snowfall: "Re: N00b questions :\"
- In reply to: northern snowfall: "Re: N00b questions :\"
- Next in thread: northern snowfall: "Re: N00b questions :\"
- Reply: northern snowfall: "Re: N00b questions :\"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]