[erlang-questions] Preventing Recursion from Crashing Me...
Sun Feb 24 00:33:23 CET 2008
I rather quickly discovered that:
factorial(0) -> 1;
factorial(N) -> N * factorial(N-1).
...was able to take sufficient resources that I only just managed to
send a ctrl+alt+break (I'm running Gnome/JDS on Solaris SXCE b72 on a
Intel Quad Core E6600 with 4Gb of memory).
Apart from not using naive fibonacci ( :P ) is there a way to prevent
erlang from running away with such processes?
More information about the erlang-questions