[Haskell-cafe] how to run in bounded space?

Oliver Charles ollie at ocharles.org.uk
Tue Dec 12 13:58:57 UTC 2017


This can be done using RTS options I believe. Compile with -rtsopts and
then run your program with +RTS -help and look for the heap options.

If you want to scope it within your program, I'm not sure about that.

Ollie

On 12 Dec 2017 1:24 pm, "Johannes Waldmann" <
johannes.waldmann at htwk-leipzig.de> wrote:

> Dear Cafe.
>
> is there an easy way (in GHC Haskell)
> to run a computation until it (times out or)
> requires more than X  MB of heap?
>
> (the main program  has a larger heap,
> but the computation should use some part of it only)
>
> This would be nice for automated tests
> with predictable resources (time and space).
>
> There is Control.Timeout.
> I guess I want Control.Spaceout.
>
> - J.
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20171212/d3825eaa/attachment.html>


More information about the Haskell-Cafe mailing list