Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19819 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85389 invoked by uid 1010); 29 Oct 2005 18:50:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 85373 invoked from network); 29 Oct 2005 18:50:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2005 18:50:43 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:43808] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3B/F1-02082-084C3634 for ; Sat, 29 Oct 2005 14:50:41 -0400 Received: (qmail 17654 invoked from network); 29 Oct 2005 18:50:36 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 29 Oct 2005 18:50:36 -0000 Message-ID: <6.2.3.4.2.20051029114933.028fd370@localhost> X-Mailer: QUALCOMM Windows Eudora Version 6.2.3.4 Date: Sat, 29 Oct 2005 11:50:34 -0700 To: Sebastian Cc: internals@lists.php.net In-Reply-To: <4e36d31d0510282341r2de4d2edta85bb2611897c7b0@mail.gmail.co m> References: <4E.0D.57990.B3A72634@pb1.pair.com> <6.2.3.4.2.20051028132228.0a164030@localhost> <4e36d31d0510281850q625316ccx1dd4a61ba59b23f8@mail.gmail.com> <6.2.3.4.2.20051028221433.02d081d0@localhost> <4e36d31d0510282341r2de4d2edta85bb2611897c7b0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] 1.5Gb PHP process, lots of swap From: andi@zend.com (Andi Gutmans) Well in most cases, if your program isn't written in the global scope but has methods or functions, then local variables will be removed early enough. For situations where you need to force it I suggest to use unset(). It'd be ugly to add another scoping operator and in most cases it's not needed. Regards, Andi At 11:41 PM 10/28/2005, Sebastian wrote: >Something like the variables produced by perl's my() operator so that >a variable is lexically scoped along with block-level scoping could >help earlier detection of when it's possible to release a variable. >This wouldn't solve leaks, but it might help prevent some > >On 10/28/05, Andi Gutmans wrote: > > What do you mean? > > > > At 06:50 PM 10/28/2005, Sebastian wrote: > > >Lexical variables would be nice. > > > > > >On 10/28/05, Andi Gutmans wrote: > > > > Hi Cristiano, > > > > > > > > Alex sent a patch to the list a while ago which forces the memory > > > > allocator to return memory to the system. However, in your case, I > > > > think you might be just having PHP variables "leaking". Can you try > > > > and identify where this info is sitting and try and unset it? It's > > > > important to dig deeper and/or reproduce in order to understand. > > > > > > > > > > > > Andi > > > > > > > > At 12:21 PM 10/28/2005, Cristiano Duarte wrote: > > > > >Is there any way to force a PHP CLI application to free the > memory it took > > > > >from the system ? I mean, is there any PHP userland or PHP internal > > > > >functional call that could *really* free 'the memory allocated by a > > > > >variable' or 'the memory allocated but currently not used > and waiting for > > > > >the script end to be freed' ? > > > > > > > > > >Regards, > > > > > > > > > >Cristiano Duarte > > > > > > > > > >-- > > > > >PHP Internals - PHP Runtime Development Mailing List > > > > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > > > > PHP Internals - PHP Runtime Development Mailing List > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > > >-- > > > > > > > > > > > >------------- > > >buddhahead@gmail.com > > > > > > >-- > > > >------------- >buddhahead@gmail.com