Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66473 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77746 invoked from network); 5 Mar 2013 18:23:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2013 18:23:38 -0000 Authentication-Results: pb1.pair.com header.from=nathan.bruer@starin.biz; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=nathan.bruer@starin.biz; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain starin.biz from 207.198.105.69 cause and error) X-PHP-List-Original-Sender: nathan.bruer@starin.biz X-Host-Fingerprint: 207.198.105.69 hawk.starindns.com Received: from [207.198.105.69] ([207.198.105.69:37020] helo=hawk.starindns.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 62/D2-58003-92836315 for ; Tue, 05 Mar 2013 13:23:37 -0500 Received: from 173-167-160-145-illinois.hfc.comcastbusiness.net ([173.167.160.145]:60699 helo=NathanBruerHP) by hawk.starindns.com with esmtpa (Exim 4.80) (envelope-from ) id 1UCwWU-0004Hz-0d for internals@lists.php.net; Tue, 05 Mar 2013 12:23:34 -0600 Sender: "Nathan Bruer" To: Date: Tue, 5 Mar 2013 12:23:35 -0600 Message-ID: <0f1001ce19ce$8ce5a260$a6b0e720$@starin.biz> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0F11_01CE199C.424C43D0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac4Zzjqdr9e19GI9Qq2799tfWTnjHw== Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hawk.starindns.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - starin.biz X-Get-Message-Sender-Via: hawk.starindns.com: authenticated_id: nathan.bruer@starin.biz Subject: Memory warning hook From: nathan@starin.biz ------=_NextPart_000_0F11_01CE199C.424C43D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit As PHP applications are turning into large frameworks one of the issues arriving is memory management. One of the issues is that many frameworks use sophisticated caching techniques to make accessing the same data quickly, this improves speed it is at the cost of memory. Often the developer knows these areas that cache and often times already have functions in place to clear out the cache, however in the case where PHP is approaching or exceeds memory limits PHP runs the GC then dies if it cannot allocate enough memory. If we implemented "memory warning" triggers or user function that will be called before the GC is executed which allows the user to try and free up some memory on their own. This hopefully would give more flexibility to allowing these advanced caching techniques but at the same time allow the cache to be cleared out in case memory is getting low. Thoughts? Thanks, Software Developer Nathan Bruer ------=_NextPart_000_0F11_01CE199C.424C43D0--