Re: Trapping "memory exhausted" error

From: Date: Tue, 17 Apr 2007 21:56:19 +0000
Subject: Re: Trapping "memory exhausted" error
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-28911@lists.php.net to get a copy of this message
On Tue, April 17, 2007 3:16 am, David Sklar wrote: > Richard Lynch <ceo@l-i-e.com> 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. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.internals (#28911) next »