On Monday 21 June 2010 03:14:42 Jari Aalto wrote:
> #!/bin/sh
>
> Test ()
> {
> Test
> }
>
> Test
What did you expect? Bash triggers a segmentation fault too, although it takes
more time (time, not number of calls) and more memory than dash.
Implementing tail recursion is probably not worth the time and effort.
Quick test on my i686:
dash: ~16000 iterations - ~1MB in resident memory at exit
posh: ~6000 iterations - ~600MB in resident memory after SIGKILLing it
bash: ~14000 iterations - ~28MB in resident memory at exit
Cheers,
--
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]