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@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@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs