#21775 [Bgs]: memory leak: emalloc(): Unable to alllocate 32 bytes

From: Date: Mon, 20 Jan 2003 17:38:06 +0000
Subject: #21775 [Bgs]: memory leak: emalloc(): Unable to alllocate 32 bytes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-30693@lists.php.net to get a copy of this message
ID: 21775 User updated by: peter.karl.mueller@gmx.de Reported By: peter.karl.mueller@gmx.de Status: Bogus Bug Type: Reproducible crash Operating System: SuSE Linux 7.3 PHP Version: 4.3.0 New Comment: PHP does not reclaim any memory no longer referenced? No garbage collection? Previous Comments: ------------------------------------------------------------------------ [2003-01-20 11:12:37] moriyoshi@php.net PHP is designed to bail out (to stop executing) when the memory has been run out. So it's natural that the runtime end up segfaulting. ------------------------------------------------------------------------ [2003-01-20 10:30:58] peter.karl.mueller@gmx.de The following code: <% class Object { var $prev; var $next; function unter (&$ref) { $ref->prev = &$this; $this->next = &$ref; } }; while (true) { print "NEW ROUND\n"; { $o = &new Object; for ($i = 0; $i < 10000; ++$i) { $o->unter (new Object); $o = &$o->next; } unset ($o); } } %> consumes as much memory it can get. I would expect that PHP garbage-collects the memory. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21775&edit=1

« previous php.bugs (#30693) next »