On 4/17/07, Peter Hodge <[EMAIL PROTECTED]> wrote:
Hello,A soft memory limit could be very useful; it doesn't necessarily need to throw an error, but it would provide an opportunity to free some memory and prevent the script from crashing. Perhaps something like: // function to call when memory is running out register_memory_limit_handler('freeSomeMemory'); function freeSomeMemory() { $GLOBALS['someBigCache'] = null; }
My intention with the grace limit was to provide a graceful way of failing, not to continue processing in a reduced state -- as Stanislav said above, it could be difficult to do a lot after the allocation has failed. David -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
