On 4/17/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Tue, April 17, 2007 3:16 am, David Sklar wrote:
> Richard Lynch <[EMAIL PROTECTED]> wrote:
>> You might also come at it from the other direction and detect/notify
>> at some number smaller than the current hard limit, configurable in
>> php.ini...
>>
>> This might play better with anything relying on the current
>> behaviour
>
> This is interesting and might actually take care of a lot of cases. I
> don't know enough about the existing memory manager to know if it
> would handle the case where a single new allocation would blow through
> both the (lower) soft limit and the hard limit at the same time.

If an allocation blows through the hard limit, it should behave
exactly as it does now, for BC, imho.

If you let the developer decide on a "soft limit" or a percentage of
the "hard limit" where some callback function happens, it's on their
heads if they do something silly that rips right past their selected
soft/hard limits.

Well, the BC case could be handled by doing what you suggest if the
"grace limit" config option isn't defined.

I think it's important, in the case that the grace limit is set up, to
trigger its behavior even if a single allocation blows away both so
that the recovery can be graceful. For example, if you're retrieving a
feed to parse or the contents of a file and that feed or file is
unexpectedly large so it blows through both memory limits.

David

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to