Re: Trapping "memory exhausted" error

From: Date: Mon, 16 Apr 2007 18:18:28 +0000
Subject: Re: Trapping "memory exhausted" error
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-28864@lists.php.net to get a copy of this message
- in addition to a memory_limit configuration directive, there could be a "memory_limit_grace" configuration directive. This gets stored in the struct _zend_mm_heap, along with the limit.
That could be a problem because it's very hard to know exact memory requirements for PHP code for most people not intimately knowing the engine internals, and also recovering from failed allocation usually is not simple since management structures could be in half-done state. So writing useful handler for such an error would be rather hard to do. Having said that, what exactly would you plan to do in this error handler? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/

« previous php.internals (#28864) next »