What's the algorithm that requires unbounded (or user-bounded) recursion in X? Is it impossible to write it in a way that uses an external allocation rather than the stack?
Cf. quicksort.
The kernel should provide a guard page to prevent against unknown flaws, but known flaws should be corrected.
Posted Aug 19, 2010 16:33 UTC (Thu) by tialaramex (subscriber, #21167)
[Link]
AFAIU It is always possible to transform a recursive algorithm into an equivalent iterative one which stores intermediate state on the heap.
In some cases the recursive algorithm will be clearer, which makes maintenance easier (and reduces the chance of security relevant bugs). In some cases the iterative algorithm will be faster (particularly if your programming language or compiler suck)
recursion
Posted Aug 22, 2010 3:31 UTC (Sun) by jeremiah (subscriber, #1221)
[Link]
>AFAIU It is always possible to transform a recursive algorithm into an equivalent iterative one which stores intermediate state on the heap.<