> True, but would you allow an application to be build with less stack > reserved than according to 'the worst case subroutine nesting'? Note > that the worst case is calculated based on the call tree, so it is a > worst case, but a realistic one (one that can happen in practice). I thought this technique is based on function references, so that if there is a switch-case or an if structure where the condition cannot be calculated or predicted at compile time, then the compiler will not be able to tell when is the function going to be called, so it assumes that at any point the function name was referenced? Tamas On Fri, Oct 24, 2008 at 2:12 PM, Wouter van Ooijen wrote: > >> A static stack is (except for the ban on recursion/reentrancy) > >> completely invisible to the user. And it takes the same amount of RAM > >> as a real data stack. > > > > Not quite. A static stack has to allocate storage based on the worst > case > > possible subroutine nesting. A real stack uses storage according to the > > actual subroutine nesting that occurs at run time. > > True, but would you allow an application to be build with less stack > reserved than according to 'the worst case subroutine nesting'? Note > that the worst case is calculated based on the call tree, so it is a > worst case, but a realistic one (one that can happen in practice). > > -- > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Rudonix DoubleSaver http://www.rudonix.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist