Branch: Tag:

2000-06-12

2000-06-12 13:51:59 by Martin Stjernholm <mast@lysator.liu.se>

Fixed bug in gc debug checks.

Rev: src/gc.c:1.92
Rev: src/gc.h:1.48
Rev: src/mapping.c:1.85
Rev: src/svalue.c:1.75

29:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.91 2000/06/12 03:21:11 mast Exp $"); + RCSID("$Id: gc.c,v 1.92 2000/06/12 13:51:58 mast Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is
923: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    + void debug_gc_check_count_free(void *a) + { +  struct marker *m; +  if (Pike_in_gc == GC_PASS_CHECK && (m = find_marker(a))) { +  if(m->saved_refs == -1) +  m->saved_refs = *(INT32 *)a - 1; +  else { +  if (m->saved_refs != *(INT32 *)a) +  gc_fatal(a, 1, "Refs changed in gc.\n"); +  m->saved_refs--; +  } +  } + } +    void gc_add_extra_ref(void *a)   {    struct marker *m = get_marker(a);