Branch: Tag:

1996-09-25

1996-09-25 01:39:10 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more debug added

Rev: src/gc.c:1.2
Rev: src/gc.h:1.3
Rev: src/svalue.c:1.3

93:    return m;   }    + #ifdef DEBUG + static void *check_for =0; +  + static void gdb_gc_stop_here(void *a) + { +  fprintf(stderr,"One ref found.\n"); + } + #endif +    void gc_check(void *a)   { -  + #ifdef DEBUG +  if(check_for) +  { +  if(check_for == a) +  { +  gdb_gc_stop_here(a); +  } +  return; +  } + #endif    getmark(a)->refs++;   }   
104: Inside #if defined(DEBUG)
   m=getmark(a);   #ifdef DEBUG    if(m->refs > *(INT32 *)a) +  { +  check_for=a; +  +  gc_check_all_arrays(); +  gc_check_all_multisets(); +  gc_check_all_mappings(); +  gc_check_all_programs(); +  gc_check_all_objects(); +  +  check_for=0;    fatal("Ref counts are totally wrong!!!\n"); -  +  }   #endif    return m->refs < *(INT32 *)a;   }