Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42558 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28595 invoked from network); 11 Jan 2009 14:51:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2009 14:51:40 -0000 X-Host-Fingerprint: 85.21.236.169 xdmitri.dialup.corbina.ru Received: from [85.21.236.169] ([85.21.236.169:24377] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/52-17244-B770A694 for ; Sun, 11 Jan 2009 09:51:40 -0500 Message-ID: To: internals@lists.php.net References: <200901101830.35403.thomas@koch.ro> <8E.40.26912.68B39694@pb1.pair.com> <4969B6C9.4070903@daylessday.org> Date: Sun, 11 Jan 2009 17:51:36 +0300 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original X-Posted-By: 85.21.236.169 Subject: Re: [PHP-DEV] Re: php daemons, memory From: dmda@yandex.ru ("jvlad") > On 11.01.2009 03:21, jvlad wrote: >> Almost. >> Try to compile your very-own-version of php, using configure argument >> --disable-zend-memory-manager > > There is no such configure option since ages. seems you're flying too high. RHEL5 still ships php5.1.6 and it has this option and it undefines ZEND_USE_ZEND_ALLOC. For the newer versions (5.2.x) it can be set at the environment, which is not that good btw. > That won't affect memory usage very much. I gives appox 2MB per php-cli instance. Sometimes it's good enough, if for example you need to run 200 instances. >> - --enable-debug did report some small leaks, but much less then the >>> consumption grow. >> >> zend memory manager won't release memory to the system. > > That's plain wrong. > Of course it does free() memory whenever it thinks the memory should be > free()-ed. > Though that doesn't guarantee that the OS is be able to reuse this memory. Antony, I think you're wrong with this. ZMM does never release memory to the system. Instead it puts free chunks into its own free memory chain. See how _zend_mm_free_int() works in 5.2.5 and it's the only function that is called from for example _efree, at least when ZMM is enabled. -regards, jv.