Resource limits for Haskell

Alexander Kjeldaas alexander.kjeldaas at gmail.com
Fri Mar 8 10:09:27 CET 2013


Nice!

The API has ccsDynamic, while the example uses newCostCentreStack.

Would it be possible to attach a listener to GC-events and dynamically
adjust the listenCostCentreStack to trigger before major GCs?

Is this secure in the Safe Haskell sense?  Can this be used to create a
secure computation wrt resources?  Could we listen to MUT seconds?

Alexander


On Fri, Mar 8, 2013 at 9:52 AM, Edward Z. Yang <ezyang at mit.edu> wrote:

> Ever wanted to write this?
>
>     -- | Forks a thread, but kills it if it has more than 'limit'
>     -- bytes resident on the heap.
>     forkIOWithSpaceLimit :: IO () -> {- limit -} Int -> IO ThreadId
>
> I have a proposal (and some unpublished experimental patches) which do
> just that.  Check it out at:
> http://hackage.haskell.org/trac/ghc/wiki/Commentary/ResourceLimits
>
> Comments, bikeshedding and critique appreciated.
>
> Cheers,
> Edward
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130308/65d7e826/attachment.htm>


More information about the ghc-devs mailing list