ID:               39652
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chris at dented-planet dot net
-Status:           Assigned
+Status:           Closed
 Bug Type:         Unknown/Other Function
 Operating System: Mac OS X 10.4.8
 PHP Version:      5.2.0
 Assigned To:      dmitry
 New Comment:

Fixed in CVS HEAD and PHP_5_2.


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

Reply via email to