<div>Simon mentioned a system of doing multiple GC's to measure actual live data.</div><div><br></div><div>But wouldn't a more limited alternative be capping <b><i>allocation</i></b> rather than live data? GHC already has an mechanism to preempt IO threads based on an allocation trip wire. In fact that's *the* preemption mechanism. Isn't the only piece missing to have a primitive similar to chez Scheme's "make-engine":</div>
<div><br></div><div> <a href="http://www.scheme.com/csug8/control.html#./control:s13">http://www.scheme.com/csug8/control.html#./control:s13</a></div><div><br></div><div>... which would transfer control to a child computation, but would return control to the parent (along with a continuation) when its allocation budget is exhausted? </div>
<div><br></div><div>Make-engine + safe-haskell + timeouts should be everything one needs to resist an adversarial untrusted program. Maybe?</div><div><br></div><div> -Ryan</div><div><br></div><div>P.S. Chez Scheme engines are actually related to # procedure calls, not allocation as far as I know.</div>
<br><br><div class="gmail_quote">On Fri, Apr 20, 2012 at 7:35 PM, Edward Z. Yang <span dir="ltr"><<a href="mailto:ezyang@mit.edu" target="_blank">ezyang@mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Excerpts from Brandon Allbery's message of Fri Apr 20 19:31:<a href="tel:54%20-0400%202012" value="+15404002012">54 -0400 2012</a>:<br>
<div class="im">> > So, it would be pretty interesting if we could have an ST s style<br>
> > mechanism, where the data structure is not allowed to escape.<br>
> > But I wonder if this would be too cumbersome for anyone to use.<br>
><br>
> Isn't this what monadic regions are for?<br>
<br>
</div>That's right! But we have a hard enough time convincing people it's<br>
worth it, just for file handles.<br>
<span class="HOEnZb"><font color="#888888"><br>
Edward<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</div></div></blockquote></div><br>