<div dir="ltr"><div>Nice!<br><br></div><div>The API has ccsDynamic, while the example uses newCostCentreStack.<br><br></div><div>Would it be possible to attach a listener to GC-events and dynamically adjust the listenCostCentreStack to trigger before major GCs?<br>

<br></div><div>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?<br></div><div><br></div><div>Alexander<br></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Fri, Mar 8, 2013 at 9:52 AM, Edward Z. Yang <span dir="ltr">&lt;<a href="mailto:ezyang@mit.edu" target="_blank">ezyang@mit.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Ever wanted to write this?<br>
<br>
    -- | Forks a thread, but kills it if it has more than &#39;limit&#39;<br>
    -- bytes resident on the heap.<br>
    forkIOWithSpaceLimit :: IO () -&gt; {- limit -} Int -&gt; IO ThreadId<br>
<br>
I have a proposal (and some unpublished experimental patches) which do<br>
just that.  Check it out at: <a href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/ResourceLimits" target="_blank">http://hackage.haskell.org/trac/ghc/wiki/Commentary/ResourceLimits</a><br>
<br>
Comments, bikeshedding and critique appreciated.<br>
<br>
Cheers,<br>
Edward<br>
<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
</blockquote></div><br></div>