Re: Trapping "memory exhausted" error
| From: | Adam Banko | Date: | Tue, 17 Apr 2007 18:03:13 +0000 |
| Subject: | Re: Trapping "memory exhausted" error | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28896@lists.php.net to get a copy of this message | ||
2007. 04. 17, kedd keltezéssel 10.18-kor David Sklar ezt írta:
> 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.
What if the allocation didn't fail on the grace limit, return a new
memory as it should, but throw (set) an exception?
I'm not sure, but I think it very unlikely that throwing an exception
inside an emalloc would cause an inconsistent state. Maybe when the
emalloc was called from throw itself, I think but this case can be
handled.
Are there any other places where setting an exception would cause an
inconsistent state? What do you think?
Adam