Branch: Tag:

2000-04-14

2000-04-14 16:05:27 by Martin Stjernholm <mast@lysator.liu.se>

Fixed bug in gc when objects are created during destroy() calls.

Rev: src/gc.c:1.61
Rev: src/gc.h:1.28
Rev: src/testsuite.in:1.294

29:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.60 2000/04/14 15:23:45 mast Exp $"); + RCSID("$Id: gc.c,v 1.61 2000/04/14 16:05:27 mast Exp $");      /* Run garbage collect approximate every time we have    * 20 percent of all arrays, objects and programs is
560: Inside #if defined(PIKE_DEBUG)
   }    return 0;    } -  m->flags |= GC_CHECKED; +    #endif    -  +  m->flags |= GC_CHECKED;    return add_ref(m);   }   
767: Inside #if defined(PIKE_DEBUG)
      m=get_marker(debug_malloc_pass(a));    -  if( !(m->flags & GC_REFERENCED) && -  ((m->flags & GC_XREFERENCED) || !(m->flags & GC_CHECKED))) +  if( !(m->flags & GC_REFERENCED) && (m->flags & GC_XREFERENCED) )    {    INT32 refs=m->refs;    INT32 xrefs=m->xrefs;
790: Inside #if defined(PIKE_DEBUG)
   }    }    -  return !(m->flags & GC_REFERENCED); +  return (m->flags & (GC_REFERENCED|GC_CHECKED)) == GC_CHECKED;   }   #endif