Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28864 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55987 invoked by uid 1010); 16 Apr 2007 18:18:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55967 invoked from network); 16 Apr 2007 18:18:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2007 18:18:47 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:42930] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/B9-18278-30EB3264 for ; Mon, 16 Apr 2007 14:18:46 -0400 Received: from [127.0.0.1] ([192.168.16.109]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 16 Apr 2007 11:18:47 -0700 Message-ID: <4623BDF4.8010005@zend.com> Date: Mon, 16 Apr 2007 11:18:28 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: David Sklar CC: internals@lists.php.net References: <7cea347c0704160319x619b26d0s7716e35493e122c4@mail.gmail.com> In-Reply-To: <7cea347c0704160319x619b26d0s7716e35493e122c4@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Apr 2007 18:18:47.0475 (UTC) FILETIME=[ACE61830:01C78053] Subject: Re: [PHP-DEV] Trapping "memory exhausted" error From: stas@zend.com (Stanislav Malyshev) > - 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/