[php-maint] Bug#420609: memory leak

.PaKud kudzia at gmail.com
Fri May 11 06:57:07 UTC 2007


Package: php5-snmp
Version: 5.2.0-8+etch3


it seems that each [successful] execution of snmpget leaks memory. i
hope this time it's not false alert - code seems to be straightforward
and result [ after few h of execution ] - obvious.

execution of following script:
<?
        set_time_limit(0);
        error_reporting(E_ALL);
        snmp_set_valueretrieval(1);

        while(1==1){
                $x = snmpget( "address_of_server" , "public" ,
"hrProcessorLoad.1");
                echo "$x\n";
        }
?>

ends with:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 2 bytes) in /root/mem/y.php on line 7

growth of memory usage can be seen on ps faux , it seems that php
actually allocates much more memory then expected 8MB.

-- 
regards,
Pawel Kudzia / .PaKud / http://pqd.one.pl




More information about the pkg-php-maint mailing list