ID: 30501
Comment by: wedro at gmx dot net
Reported By: ilia at manual dot ru
Status: Open
Bug Type: Reproducible crash
Operating System: FreeBSD 5.2.1
PHP Version: 5.0.2
New Comment:
the same here:
linux 2.2.25
PHP 5.0.2 (cli)
FATAL: emalloc(): Unable to allocate 37 bytes
Previous Comments:
------------------------------------------------------------------------
[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