PHP 4.0 Bug #9223: recode_string leaks memory
| From: | rr at nci dot ch | Date: | Mon, 12 Feb 2001 10:33:56 +0000 |
| Subject: | PHP 4.0 Bug #9223: recode_string leaks memory | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46417@lists.php.net to get a copy of this message | ||
From: rr@nci.ch
Operating system: SuSE-Linux 7.0
PHP version: 4.0.4pl1
PHP Bug Type: Recode related
Bug description: recode_string leaks memory
I use the following procedure to recode records that are read in from a dbase file. If I run this
script for all the 3500 records in the dbase file the apache server process uses 150MB of memory.
function recodeDBF($dbfin) {
$dbfout=array();
while( list($key, $inval) = each($dbfin) ) {
$dbfout[$key]=recode_string("pc..l1",trim($inval)); // A LOT OF MEMORY
// $dbfout[$key]=trim($inval); // NORMAL MEMORY USAGE
}
return $dbfout;
}
--
Edit Bug report at: http://bugs.php.net/?id=9223&edit=1