Resource limits for Haskell
Edward Z. Yang
ezyang at MIT.EDU
Fri Mar 8 10:14:14 CET 2013
Excerpts from Alexander Kjeldaas's message of Fri Mar 08 01:09:27 -0800 2013:
> The API has ccsDynamic, while the example uses newCostCentreStack.
Oops, fixed. (Added the newCostCentreStack helper function).
> Would it be possible to attach a listener to GC-events and dynamically
> adjust the listenCostCentreStack to trigger before major GCs?
Yes, but these listeners would only trigger after the GC, and have no
guarantee of triggering in a timely fashion (e.g. before the next GC).
Generally it's only safe to trigger "one-time" events.
> 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?
That's the idea! But we'll need semantics before we can say for sure.
Actually, as far as time resources are concerned, the hope is to use
this in conjunction with http://hackage.haskell.org/trac/ghc/ticket/7606
More information about the ghc-devs