ID:               37929
 Updated by:       [EMAIL PROTECTED]
 Reported By:      joe at estara dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: Linux
 PHP Version:      5.1.4, 4.4.0
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Any evidence like valgrind etc?

The OS releases memory when it needs it.


Previous Comments:
------------------------------------------------------------------------

[2006-07-06 18:27:57] joe at estara dot com

Arrays of arrays leak memory in many PHP versions.

------------------------------------------------------------------------

[2006-07-01 00:15:27] joe at estara dot com

Here, fully contained version that will make a 131M leak in 12 lines. 
<?php
ini_set("memory_limit", "64M");
function make_arr() {
   for($i=0; $i<396768; $i++)
        $a[sprintf("%05d",$i)] = array(0 => "PHPLEAKS923889239823", 1
=> "PHPLEAK2349082349898");
   return $a;
}
for($i=0;$i<10;$i++)
  $zip[$i] = make_arr();
for($i=0;$i<10;$i++)
   preg_match("/asdfl/", $zip[$i]["00601"][0]);
?>

------------------------------------------------------------------------

[2006-07-01 00:00:26] joe at estara dot com

It's 8 lines without comments.  You want me to write a script to make
the data file instead of just downloading it?
<?php
ini_set("memory_limit", "64M");
$s = file_get_contents("ziplatlong");
$z = unserialize($s);
for($i=0;$i<10;$i++)
  $zip[$i] = unserialize($s);
for($i=0;$i<10;$i++)
   preg_match("/asdfl/", $zip[$i]["00601"][0]);
?>

------------------------------------------------------------------------

[2006-06-30 23:17:27] [EMAIL PROTECTED]

Please provide _SHORT_ and complete reproduce script.

A proper reproducing script starts with <?php and ends with ?>, is max.
10-20 lines long and does not require any external resources such as
databases, etc.

------------------------------------------------------------------------

[2006-06-30 23:02:54] joe at estara dot com

Download an example here:
http://zeus-1.estara.com/php_mem_leak.zip

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/37929

-- 
Edit this bug report at http://bugs.php.net/?id=37929&edit=1

Reply via email to