Limiting resources on a per-function basis?

Ketil Malde ketil+haskell at ii.uib.no
Mon Jan 5 09:01:46 EST 2004


Jeff Newbern <jnewbern at nomaware.com> writes:

> Thanks for your input.  I am mainly interested in this functionality to
> enhance my unit tests.  I want to be able to run test cases with limits
> on time, heap, stack, etc. and fail the test if it exceeds the limits.

Well, if you can isolate the tests well enough (i.e. not run too many
other parts of your program), you could possibly get by with GHC's
options for limiting resources (for the whole program)?  In particular
the +RTS -K and -M options would be useful, see
<http://www.haskell.org/ghc/docs/6.2/html/users_guide/runtime-control.html#RTS-OPTIONS-GC>
for details. 

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list