|
-
April 24th, 2007, 03:05 AM
#1
Where is stack frame
Hi
I am reading documents about stack frame. But i really confused about where the stack frame of func. is.
For example here
http://courses.ece.uiuc.edu/ece390/l...ckwood/l8.html
It doesnt include local variables to stack frame
But here
http://en.wikipedia.org/wiki/Call_stack
it includes.
So can anyone explain me which one is true?
What is the procedure for function call in c?
I am looking for your answers
Thanks.
-
April 24th, 2007, 03:51 AM
#2
Re: Where is stack frame
Both are right, the first link talks in context of assembly language, which is little raw, but the wiki article is better to understand.
In C/C++, first the arguments are pushed, return address and then EBP. Once the function enters, it creates it's local variables on stack, thus moving the stack pointer further by size of it's variables.
Take a look at following article,
Playing with stack
Regards,
Ramkrishna Pawar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|