Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25004 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82275 invoked by uid 1010); 27 Jul 2006 12:59:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82260 invoked from network); 27 Jul 2006 12:59:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2006 12:59:05 -0000 X-PHP-List-Original-Sender: bertrand@toggg.com X-Host-Fingerprint: 212.27.42.28 smtp2-g19.free.fr Linux 2.4/2.6 Received: from ([212.27.42.28:55689] helo=smtp2-g19.free.fr) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id E9/3F-23194-698B8C44 for ; Thu, 27 Jul 2006 08:59:04 -0400 Received: from [192.168.0.3] (lns-bzn-55-82-255-155-187.adsl.proxad.net [82.255.155.187]) by smtp2-g19.free.fr (Postfix) with ESMTP id E536125C37; Thu, 27 Jul 2006 14:58:59 +0200 (CEST) Message-ID: <44C8B9B8.5030108@toggg.com> Date: Thu, 27 Jul 2006 15:03:52 +0200 Reply-To: bertrand@toggg.com User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ilia Alshanetsky CC: internals@lists.php.net References: <00d601c6af9d$c18f2d30$0201a8c0@pc1> <003701c6afb1$81b87720$6e02a8c0@thinkpad> <44C6205F.4090808@php.net> <00ed01c6b163$c3d40ad0$0201a8c0@pc1> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] memory_get_usage with new Memory Manager From: bertrand@toggg.com (bertrand Gugger) Ilia Alshanetsky wrote: > > On 27-Jul-06, at 6:02 AM, Matt W wrote: > >> >> Something else I'd like to see changed... Does anyone think >> memory_get_[peak_]usage() should *always* be available, regardless of >> whether memory_limit is actually enabled? Using the Windows binaries at >> least, I was devastated :-D that they were unavailable for >> experimenting, >> etc. >> > > Counting memory all the time adds a fair amount of overhead to script > execution especially given how frequently PHP needs to allocate memory. > Therefore usage memory utilization functions are only available when > PHP is compiled with memory in which case it keeps track of its mem usage. That may hear off topic , but how you enable something else than 8M *without* getting this counting overhead ? It looks to me that --enable-memory-limit mixes 2 independant roles : - setting the amount of available memory, and enabling eventually local setting, - enabling the evaluation of the process consumption. I would like to be wrong on this :) -- toggg