Branch: Tag:

2000-04-12

2000-04-12 18:40:12 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more debug in gc()

Rev: src/array.c:1.64
Rev: src/error.c:1.45
Rev: src/gc.c:1.54
Rev: src/gc.h:1.25
Rev: src/interpret.c:1.140
Rev: src/mapping.c:1.72
Rev: src/multiset.c:1.18
Rev: src/object.c:1.101
Rev: src/pike_memory.c:1.64
Rev: src/svalue.c:1.67

5:   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.71 2000/04/06 20:17:05 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.72 2000/04/12 18:40:12 hubbe Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
1825:    }   }    - void gc_check_all_mappings(void) + static void gc_check_mapping(struct mapping *m)   {    INT32 e;    struct keypair *k; -  struct mapping *m; +     -  for(m=first_mapping;m;m=m->next) -  { - #ifdef DEBUG_MALLOC -  if (((int)m->data) == 0x55555555) { -  fprintf(stderr, "** Zapped mapping in list of active mappings!\n"); -  describe_something(m, T_MAPPING, 1); -  fatal("Zapped mapping in list of active mappings!\n"); -  } - #endif /* DEBUG_MALLOC */ +     if((m->data->ind_types | m->data->val_types) & BIT_COMPLEX)    { -  if(gc_check(m->data)) continue; +  if(gc_check(m->data)) return;       MAPPING_LOOP(m)    {
1856:    debug_gc_check_svalues(&k->ind, 1, T_MAPPING, m);    m->data->val_types |= debug_gc_check_svalues(&k->val, 1, T_MAPPING, m);    } +  } + }    -  + void gc_check_all_mappings(void) + { +  struct mapping *m; +  +  for(m=first_mapping;m;m=m->next) +  { + #ifdef DEBUG_MALLOC +  if (((int)m->data) == 0x55555555) { +  fprintf(stderr, "** Zapped mapping in list of active mappings!\n"); +  describe_something(m, T_MAPPING, 1); +  fatal("Zapped mapping in list of active mappings!\n"); +  } + #endif /* DEBUG_MALLOC */ +  +  gc_check_mapping(m);   #ifdef PIKE_DEBUG    if(d_flag > 1) check_mapping_type_fields(m);   #endif -  +     }   } - } +       void gc_mark_all_mappings(void)   {
1941:    }    else    { + #ifdef PIKE_DEBUG +  if(d_flag) gc_check_mapping(m); + #endif    next=m->next;    }    }