#46102 [Com]: getenv() memory leak

From: Date: Wed, 24 Sep 2008 21:04:47 +0000
Subject: #46102 [Com]: getenv() memory leak
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-129233@lists.php.net to get a copy of this message
 ID:               46102
 Comment by:       ilia dot cheishvili at gmail dot com
 Reported By:      jim at centerfuse dot net
 Status:           Open
 Bug Type:         Performance problem
 Operating System: Windows XP
 PHP Version:      5.2.6
 New Comment:

This does not occur on the latest CVS checkout of 5.3.0.


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

[2008-09-17 04:17:46] jim at centerfuse dot net

Description:
------------
getenv() appears to cause a memory leak on Windows XP, 5.2.5. Could not
reproduce on FreeBSD 4/PHP 5.0.5. It seems to only happen in the Apache
module - the CLI exhibits the expected behavior.

Reproduce code:
---------------
echo memory_get_usage() . '<br /><br />';
		for ( $j = 0; $j < 100; $j++ ) {
			@getenv('SCRIPT_NAME');
			echo memory_get_usage() . '<br />';
		}
		


Expected result:
----------------
memory_get_usage() should report the same amount through all iterations

Actual result:
--------------
memory_get_usage() reports the same amount for the first 28 iterations,
then begins to climb and continues to climb


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


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



Thread (3 messages)

« previous php.bugs (#129233) next »