Branch: Tag:

2003-09-09

2003-09-09 08:29:31 by Martin Stjernholm <mast@lysator.liu.se>

Fix when PIKE_DEBUG and GC_MARK_DEBUG both are defined.

Rev: src/gc.c:1.197

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.196 2003/09/08 15:28:14 mast Exp $ + || $Id: gc.c,v 1.197 2003/09/09 08:29:31 mast Exp $   */      #include "global.h"
31:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.196 2003/09/08 15:28:14 mast Exp $"); + RCSID("$Id: gc.c,v 1.197 2003/09/09 08:29:31 mast Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is
1240:   {    struct gc_queue_block *b;    + #ifdef PIKE_DEBUG +  { +  struct marker *m; +  if (gc_is_watching && (m = find_marker(data)) && m->flags & GC_WATCHED) { +  /* This is useful to set breakpoints on. */ +  fprintf(stderr, "## Watched thing %p found in " +  "gc_mark_enqueue() in pass %d.\n", data, Pike_in_gc); +  } +  } + #endif +     b=gc_mark_last;    if(!b || b->used >= GC_QUEUE_ENTRIES)    {
1817:    m->flags |= GC_GOT_DEAD_REF;   }    - #ifdef PIKE_DEBUG - void gc_mark_enqueue(queue_call call, void *data) - { -  struct marker *m; -  if (gc_is_watching && (m = find_marker(data)) && m->flags & GC_WATCHED) { -  /* This is useful to set breakpoints on. */ -  fprintf(stderr, "## Watched thing %p found in " -  "gc_mark_enqueue() in pass %d.\n", data, Pike_in_gc); -  } -  enqueue(&gc_mark_queue, call, data); - } - #endif -  +    int gc_mark(void *a)   {    struct marker *m = get_marker(debug_malloc_pass(a));