Simple Q
spamtrap_at_crayne.org
Date: 02/20/05
- Next message: Raghar : "Re: Pentium 4 simulator"
- Previous message: Chris : "Re: Sending messages to other programs"
- Next in thread: David Lindauer : "Re: Simple Q"
- Reply: David Lindauer : "Re: Simple Q"
- Reply: Tim Roberts : "Re: Simple Q"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 20 Feb 2005 21:28:09 +0000 (UTC)
All:
I have a basic question. I am using VC 6.0 and am looking at the stack
setup code for a standard C function (cdecl calling convenion) with the
following prototype:
void f();
The implementation is:
void f() { }
When I look at the stack set-up code in the disassembly, the standard
code is:
00401030 push ebp
00401031 mov ebp,esp
00401033 sub esp,40h
My question is, why the sub esp, 40h? This sets up 40h (64) bytes of
space on the stack, but there is nothing to put there -- no params, no
local vars. Why the allocation?
Thanks,
John
- Next message: Raghar : "Re: Pentium 4 simulator"
- Previous message: Chris : "Re: Sending messages to other programs"
- Next in thread: David Lindauer : "Re: Simple Q"
- Reply: David Lindauer : "Re: Simple Q"
- Reply: Tim Roberts : "Re: Simple Q"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|