<br><br><div><span class="gmail_quote">On 6/22/06, <b class="gmail_sendername">Gerhard Häring</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Brett Cannon wrote:<br>> I have been working on a design doc for restricted execution of Python<br>> [...]<br><br>All the rest of the API made sense to me, but I couldn't understand why<br><br>PyXXX_MemoryFree<br><br>
is needed. How could memory usage possibly fall below 0?</blockquote><div><br>It can't in real life, but people could call MemoryFree() too many times. Plus you need some way to lower the amount when memory is freed. No need to penalize a script that does a bunch of malloc/free calls compared to one that just does a bunch of malloc calls.