Branch: Tag:

2000-09-14

2000-09-14 19:58:44 by Martin Stjernholm <mast@lysator.liu.se>

Fixed debug code for the middletouch pass in the gc.

Rev: src/array.c:1.87
Rev: src/gc.h:1.65
Rev: src/mapping.c:1.105
Rev: src/multiset.c:1.28
Rev: src/object.c:1.148
Rev: src/program.c:1.272
Rev: src/stralloc.c:1.100

5:   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.104 2000/09/14 15:23:41 mast Exp $"); + RCSID("$Id: mapping.c,v 1.105 2000/09/14 19:58:43 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
67:    } \    DOUBLEUNLINK(first_mapping, m); \    \ -  GC_FREE(); +  GC_FREE(m);         #undef COUNT_OTHER
199:    debug_malloc_touch(md);      #ifdef PIKE_DEBUG -  if (Pike_in_gc > GC_PASS_PREPARE && Pike_in_gc < GC_PASS_ZAP_WEAK) -  fatal("Can't free a mapping_data inside gc.\n"); -  +     if (md->refs) {    fatal("really_free_mapping_data(): md has non-zero refs: %d\n",    md->refs);
215:    }       free((char *) md); +  GC_FREE_BLOCK(md);   }      PMOD_EXPORT void do_free_mapping(struct mapping *m)
311: Inside #if defined(PIKE_DEBUG)
   if(md->refs <=0)    fatal("Zero refs in mapping->data\n");    -  if (Pike_in_gc > GC_PASS_PREPARE && Pike_in_gc < GC_PASS_ZAP_WEAK) -  fatal("Can't rehash a mapping inside gc.\n"); -  +     if(d_flag>1) check_mapping(m);   #endif   
336:    mapping_rehash_backwards_evil(new_md, md->hash[e]);       free((char *)md); +  GC_FREE_BLOCK(md);    }      #ifdef PIKE_DEBUG