Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Stack usage
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="James Kanze, post: 1712568"] [email]Dan.Pop@cern.ch[/email] (Dan Pop) writes: |> In <40B5CF25.37D70C4A@yahoo.com> CBFalconer <cbfalconer@yahoo.com> |> writes: |> >Peter Nilsson wrote: |> >>> Michael Sig Birkmose wrote: |> >>>| Does anyone know, if it is possible to meassure the maximum |> >>>| stack usage of a C program throughout it's entire execution? |> >>> It may be, but it is irrelevant here. As far as standard C is |> >>> concerned, there is no such thing as a 'stack'. ... |> >> Well, yes there is. It just isn't ever explicitly called a stack. |> >> But the behaviour of function calls is well defined and |> >> consistent with the notion of stacks. |> >Nonsense. I can fairly easily design a machine with no stack, no |> >call instruction, and have it execute C programs. |> You forgot to engage your brain while reading Peter Nilsson's post. |> It doesn't matter how function calls work, implementing C without at |> least one stack data structure, even if conceivable, is not going to |> happen, due to QoI reasons. Well, by definition the data structure for auto variables and return addresses is a stack. How the stack is implemented, of course, is implementation defined -- I once used a C compiler in which function prologues called malloc to obtain the local stack frame. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Stack usage
Top