Branch: Tag:

2000-04-13

2000-04-13 23:52:29 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more debug..

Rev: src/gc.c:1.59
Rev: src/gc.h:1.26

29:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.58 2000/04/13 22:19:23 grubba Exp $"); + RCSID("$Id: gc.c,v 1.59 2000/04/13 23:52:29 hubbe Exp $");      /* Run garbage collect approximate every time we have    * 20 percent of all arrays, objects and programs is
534:      INT32 real_gc_check(void *a)   { +  struct marker *m=get_marker(a); + ;   #ifdef PIKE_DEBUG    if(check_for)    {
558: Inside #if defined(PIKE_DEBUG)
   }    return 0;    } +  m->flags |= GC_CHECKED;   #endif -  return add_ref(get_marker(a)); +  +  return add_ref(m);   }      static void init_gc(void)
763: Inside #if defined(PIKE_DEBUG)
      m=get_marker(debug_malloc_pass(a));    -  if( !(m->flags & GC_REFERENCED) && (m->flags & GC_XREFERENCED)) +  if( !(m->flags & GC_REFERENCED) && +  ((m->flags & GC_XREFERENCED) || !(m->flags & GC_CHECKED)))    {    INT32 refs=m->refs;    INT32 xrefs=m->xrefs;
772: Inside #if defined(PIKE_DEBUG)
   {    fprintf(stderr,    "**gc_is_referenced failed, object has %ld references,\n" -  "** while gc() found %ld + %ld external. (type=%d)\n", -  (long)*(INT32 *)a,(long)refs,(long)xrefs,t); +  "** while gc() found %ld + %ld external. (type=%d, flags=%d)\n", +  (long)*(INT32 *)a,(long)refs,(long)xrefs,t,m->flags);    describe_something(a, t, 1);       locate_references(a);