Help: Stack-overflow and tail-recursive functions
Koji Nakahara
yu-@div.club.ne.jp
Sat, 21 Jun 2003 11:15:17 +0900
On Fri, 20 Jun 2003 07:54:50 -0700
"Hal Daume" <t-hald@microsoft.com> wrote:
> mine didn't either, until I increased the "200" to around "1500"...it's
> probably OS/memory specific.
Only 600 causes the stack overflow in my environment(FreeBSD, 640MB).
Interestingly, on GHCi, the program shows the elements which are constructed
from the first row of the matrix, "rests awhile" and then stack
overflows (n >= 600) or continues fine (n <= 500).
With the improved definition of rmat I wrote in my last mail (Subject: listArray and stack overflow (Re: Help: Stack-overflow and tail-recursive functions))
it runs without both that rest and stack overflow (at least n <= 2000).