Stack size
Sigbjorn Finne
sof@galconn.com
Thu, 13 Sep 2001 11:13:20 -0700
Hi,
any chance of having a look at the code that's causing these
problems?
The only way to increase the Hugs control stack size is by
recompiling the sources, after having tweaked NUM_STACK
in prelude.h
The default C stack size on Win32 is 1MB, and you can change this
by re-linking with "/link /stack:<reserve>" added to the link line (this
is with MSVC tools & <reserve> being the size in bytes).
hth
--sigbjorn
----- Original Message -----
From: "ajf" <ajf@doc.ic.ac.uk>
To: <hugs-bugs@haskell.org>
Sent: Thursday, September 13, 2001 03:48
Subject: Stack size
>
> I'm using the Feb 2000 release of Hugs and am preparing student labs
> using the graphics library. Several nasties happen:
>
> * For very moderate problems (plot ~2K lines centred in a window of
> fixed size) I get a control stack overflow. To centre, the code finds
> pre-computes the minimum and maximum x and y ordinates of all line
> end-points. This is potentially a problem, but fixable in this case,
> you'd hope. However, the overflow happens EVEN IF the code is written
> tail-recursive, or using foldl. Oh dear.
>
> * If the relevant scaling factors are passed as parameters (to avoid
> pre-computation) I can plot quite a bit more (4997 lines on my W2000
> set-up; rather more on an earlier installation under W98). But then the
> program aborts, presumably because of the C stack overflow problem.
>
> * On W2000 the previous problem corrupts the WHOLE screen buffer, rather
> like a virus. Actually this is fixable by maximising and then
> minimising the hugs window, but it's all very disturbing! On W98, the
> programs seems to die gracefully.
>
> So question: how do I increase the stack size? Also, are you aware of
> problems with the graphics library burning up the C stack? I cannot
> find anything in the hugs documentation, but have a feeling you have to
> recompile Hugs. Is this true?
>
> (Otherwise Hugs is completely wonderful...!)
>
> Many thanks.
>
> Tony Field
> Imperial College
>
>
> _______________________________________________
> Hugs-Bugs mailing list
> Hugs-Bugs@haskell.org
> http://www.haskell.org/mailman/listinfo/hugs-bugs