Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24954 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59272 invoked by uid 1010); 25 Jul 2006 04:12:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 59257 invoked from network); 25 Jul 2006 04:12:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2006 04:12:36 -0000 X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from ([209.142.136.132:52890] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 6E/49-04178-28595C44 for ; Mon, 24 Jul 2006 23:52:35 -0400 Received: from pc1 (d29-214.rt-bras.wnvl.centurytel.net [69.179.156.214]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k6P3qUTl009168 for ; Mon, 24 Jul 2006 22:52:30 -0500 Message-ID: <00d601c6af9d$c18f2d30$0201a8c0@pc1> To: Date: Mon, 24 Jul 2006 22:52:31 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: memory_get_usage with new Memory Manager From: php_lists@realplain.com ("Matt W") Hi, After looking through the new Memory Manager code, I assumed this would be the case... (and just now got to test). Since heap->size is only updated when a 256K or whatever block is *actually* allocated/freed, the number returned by memory_get_usage() will only be a multiple of that. That doesn't make it very useful anymore if one is using it to see how much memory usage differs by changing, say, number of arrays/elements/variables, strings, etc. as I was last month (small changes). And the example in the manual definitely won't work as shown. Does anybody else think that memory_get[peak_]usage() should work more like before? I would imagine it can be "fixed" fairly easily, though it probably needs another variable, and just a little extra overhead of inc./dec. that variable more often (but I think that was done in the old MM anyway?). Thanks, Matt