[php-maint] Current etch php package has a problem.

Tero Heikkinen tero.heikkinen at rohea.com
Wed Jul 2 06:31:03 UTC 2008


Hi.

I noticed that current php package 5.2.0-8+etch11 has a problem. PHP  
version that is inside does not free up memory. It means generally  
that if your you have to for example loop things through you'll end  
up having quite a lot memory reserved without a reason.

I tried and compiled PHP 5.2.6 from source and it seems that in that  
version the problem has been fixed. Is it possible to have this patch  
to the current stable version?

Example code that I provide is not memory intensive, but if you have  
a class that takes ~1mb of memory, suddenly all scripts die quite soon.

Best Regards
Tero Heikkinen

Example code:
<?php
echo("Memory used: ".memory_get_usage()."\n");
for($i = 0; $i < 100000; $i++)
{
     if($i%1000 == 0)
     {
         echo("\n$i : Memory used: ".memory_get_usage()."");
     }
     unset($ip);
     $ip = new test();
     $i++;
}
class test{
     var $data = "Some data";
     var $data2 = "Some data";
     var $data3 = "Some data";
     var $data4 = "Some data";
     var $data5 = "Some data";
     var $data6 = "Some data";
     var $data7 = "Some data";
}
?>




More information about the pkg-php-maint mailing list