Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65602 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47304 invoked from network); 4 Feb 2013 01:18:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2013 01:18:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=petrich@tronic-media.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=petrich@tronic-media.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain tronic-media.com from 67.18.221.210 cause and error) X-PHP-List-Original-Sender: petrich@tronic-media.com X-Host-Fingerprint: 67.18.221.210 p44.net Linux 2.6 Received: from [67.18.221.210] ([67.18.221.210:52633] helo=mail.p44.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/B0-40350-B6C0F015 for ; Sun, 03 Feb 2013 20:18:36 -0500 Received: from rootp-server (p44net [127.0.0.1]) by mail.p44.net (Postfix) with ESMTP id CAD253A0026; Mon, 4 Feb 2013 01:58:21 +0100 (CET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Cc: internals@lists.php.net References: <510E9031.9040209@gmail.com> Date: Mon, 04 Feb 2013 08:18:22 +0700 To: "Terry Ellison" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <510E9031.9040209@gmail.com> User-Agent: Opera Mail/12.12 (Win32) Subject: Re: [PHP-DEV] (non)growing memory while creating anoymous functions via eval() From: petrich@tronic-media.com (=?utf-8?Q?Hans-J=C3=BCrgen_Petrich?=) Hi Terry and all thank you very much for your response. > The only thing that confused me about what you say that the second *doesn't* grow Yes, about that i was [and am still :-)] also confused... why the 2nd one won't grow *non-stop* > so I checked and it does -- just the same as the first. Right, it grows, but not non-stop as in the 1st one. The memory will stop growing (on my machine) at ~2491584 bytes and the loop is able to run forever, creating each eval() furthermore uniqe ano-function's but not endless-filling Zend-internal tables. > but this still leaves the function record itself in the function_table hash so with a non-zero reference count and this doesn't get DTORed until request shutdown Not familar with the Zend-internals but just about so i was imaging and expecting it. That why i [still] also confused/wondering why in the 2nd example the memory will not grow *endless*. It seems that the function records in the function_table will be DTORed (or similar cleaned up) before request-shutdown at some point... Could this be the case?