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

From: Date: Tue, 21 Jan 2003 13:26:32 +0000
Subject: #21775 [Opn]: memory leak: emalloc(): Unable to alllocate 32 bytes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-30822@lists.php.net to get a copy of this message
ID: 21775 Updated by: moriyoshi@php.net Reported By: peter.karl.mueller@gmx.de Status: Open Bug Type: Reproducible crash Operating System: SuSE Linux 7.3 PHP Version: 4.3.0 New Comment: Sorry, my bad. I missed "unset" statement. As for the memory-limit problem it was a bug indeed. See bug #20802. Previous Comments: ------------------------------------------------------------------------ [2003-01-21 06:03:28] peter.karl.mueller@gmx.de my http process rund out of memory after it blowed up to 320 MB (have 256 MB RAM). in php.ini memory_limit = 8M. IMHO this is not bogus! ------------------------------------------------------------------------ [2003-01-20 11:38:05] peter.karl.mueller@gmx.de PHP does not reclaim any memory no longer referenced? No garbage collection? ------------------------------------------------------------------------ [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 (#30822) next »