#30501 [Com]: memory leak

From: Date: Sun, 24 Oct 2004 12:11:53 +0000
Subject: #30501 [Com]: memory leak
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68035@lists.php.net to get a copy of this message
ID: 30501 Comment by: no at mail dot ru Reported By: ilia at manual dot ru Status: Open Bug Type: Zend Engine 2 problem Operating System: FreeBSD 5.2.1 PHP Version: 5.0.2 New Comment: Had same not only on php5, but on PHP4.3.9 also Previous Comments: ------------------------------------------------------------------------ [2004-10-21 18:55:07] wedro at gmx dot net the same here: linux 2.2.25 PHP 5.0.2 (cli) FATAL: emalloc(): Unable to allocate 37 bytes ------------------------------------------------------------------------ [2004-10-20 21:41:19] ilia at manual dot ru Memory limit was 1M for this test ------------------------------------------------------------------------ [2004-10-20 20:31:26] ilia at manual dot ru Description: ------------ unset() does not free memory. In the example, list() is important. Reproduce code: --------------- for($i=1;$i<10000000;$i++) { list($b['a']) = array ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); unset($b['a'],$b); } Actual result: -------------- PHP Fatal error: Allowed memory size of 1048576 bytes exhausted (tried to alloc ate 16 bytes) in /tmp/tours2lite.php on line 28 Fatal error: Allowed memory size of 1048576 bytes exhausted (tried to allocate 1 6 bytes) in /tmp/tours2lite.php on line 28 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30501&edit=1

« previous php.bugs (#68035) next »