[PHP-DEV] PHP 4.0 Bug #9223 Updated: recode_string leaks memory

2001-03-08 Thread stas

ID: 9223
Updated by: stas
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Analyzed
Bug Type: Recode related
Assigned To: 
Comments:

Better be in 'Analyzed', to know the problem still exists.

Previous Comments:
---

[2001-03-08 11:46:32] [EMAIL PROTECTED]
Seems that this is a recode memory leak, not PHP's. At least
Insure says that recode library is leaking memory all over
the place. You may want to contact recode developers. 

---

[2001-02-12 05:33:56] [EMAIL PROTECTED]
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;
}



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9223&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Bug #9223 Updated: recode_string leaks memory

2001-03-08 Thread Stanislav Malyshev

SS>> That could also mean that the recode extension does not call
SS>> cleanup handlers of the recode library.  In the
SS>> zlib/ob_gzhandler case that was the primary cause for the
SS>> huge memory leak.

The problem that it is leaking "in process", i.e. each call to
recode_string costs me some memory, allocated inside recode, and not freed
even after delete_request. I guess maybe the developers of recode wanted
to free it on delete_outer, but that would be strange.  Otherwise, recode
extension works exactly like written in the recode manual.
-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Bug #9223 Updated: recode_string leaks memory

2001-03-08 Thread Sascha Schumann

On 8 Mar 2001 [EMAIL PROTECTED] wrote:

> ID: 9223
> Updated by: stas
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Closed
> Bug Type: Recode related
> Assigned To:
> Comments:
>
> Seems that this is a recode memory leak, not PHP's. At least
> Insure says that recode library is leaking memory all over
> the place. You may want to contact recode developers.

That could also mean that the recode extension does not call
cleanup handlers of the recode library.  In the
zlib/ob_gzhandler case that was the primary cause for the
huge memory leak.

- Sascha


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9223 Updated: recode_string leaks memory

2001-03-08 Thread stas

ID: 9223
Updated by: stas
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Recode related
Assigned To: 
Comments:

Seems that this is a recode memory leak, not PHP's. At least
Insure says that recode library is leaking memory all over
the place. You may want to contact recode developers. 

Previous Comments:
---

[2001-02-12 05:33:56] [EMAIL PROTECTED]
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;
}



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9223&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]