From:             [EMAIL PROTECTED]
Operating system: SuSE Linux 7.3
PHP version:      4.3.0
PHP Bug Type:     Reproducible crash
Bug description:  memory leak: emalloc(): Unable to alllocate 32 bytes

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 bug report at http://bugs.php.net/?id=21775&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21775&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21775&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21775&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21775&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21775&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21775&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21775&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21775&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21775&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21775&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21775&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21775&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21775&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21775&r=gnused

Reply via email to