Re: How to increment an Int in Haskell (stack overflow issue)

25 Mar
2009
25 Mar
'09
7:06 p.m.
From: Tim Bauer
I have a program that is currently blowing out the stack, Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize' to increase it. I am pretty sure I get to the end of the computation that increments various statistic counters (lazily?) and only when I go to print them out at the end, do things fail.
In addition to the excellent advice provided by others on this topic, you may want to look at using GHC's heap profiler if you can't track down the source of a memory issue. I've found it helpful in the past. Keep in mind that there are several different modes that may or may not be helpful for a particular problem, so you should try them all to see if you get any useful information. John
5902
Age (days ago)
5902
Last active (days ago)
0 comments
1 participants
participants (1)
-
John Lato