#39652 [Opn->Asn]: memory_get_usage() Bug
| From: | tony2001@php.net | Date: | Tue, 28 Nov 2006 00:35:27 +0000 |
| Subject: | #39652 [Opn->Asn]: memory_get_usage() Bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-105512@lists.php.net to get a copy of this message | ||
ID: 39652
Updated by: tony2001@php.net
Reported By: chris at dented-planet dot net
-Status: Open
+Status: Assigned
Bug Type: Unknown/Other Function
Operating System: Mac OS X 10.4.8
PHP Version: 5.2.0
-Assigned To:
+Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2006-11-28 00:08:47] chris at dented-planet dot net
Description:
------------
I don't know if it's utf8_encode() or memory_get_usage() in the
following script that might be causing the issue. But rather quickly in
the loop, memory_get_usage() begins to report a steadily decreasing
amount of memory used until it drops into negative values.
A graph of usage is at: http://dented-planet.net/graph.png
'memory_limit' is set to 100MB in php.ini.
I know this isn't the best possible bug report, but I'm not sure how
else to report it.
Reproduce code:
---------------
<?php
$x = '';
for ($i = 1; $i <= 20000; $i++) {
$x = utf8_encode('this is a test');
if ($i % 100 === 0) {
echo $i . ' ' . memory_get_usage() . ' ' .
memory_get_usage(true) . "\n";
}
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39652&edit=1