pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:23:   #include "constants.h"   #include "interpret.h"   #include "bignum.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.132 2000/09/04 23:08:33 grubba Exp $"); + RCSID("$Id: gc.c,v 1.133 2000/09/14 15:25:36 mast Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is    * garbage.    */      #define GC_CONST 20   #define MIN_ALLOC_THRESHOLD 1000   #define MAX_ALLOC_THRESHOLD 10000000   #define MULTIPLIER 0.9
pike.git/src/gc.c:1108: Inside #if defined(PIKE_DEBUG)
   gc_extra_refs--;   }      int debug_gc_is_referenced(void *a)   {    struct marker *m;    if (!a) fatal("Got null pointer.\n");    if (Pike_in_gc != GC_PASS_MARK)    fatal("gc_is_referenced() called in invalid gc pass.\n");    - #ifdef PIKE_DEBUG +     if (gc_debug) {    m = find_marker(a);    if ((!m || !(m->flags & GC_PRETOUCHED)) &&    !safe_debug_findstring((struct pike_string *) a))    gc_fatal(a, 0, "Doing gc_is_referenced() on invalid object.\n");    if (!m) m = get_marker(a);    } -  else - #endif /* PIKE_DEBUG */ -  m = get_marker(a); +  else m = get_marker(a);       if (m->flags & GC_IS_REFERENCED)    gc_fatal(a, 0, "gc_is_referenced() called twice for thing.\n");    m->flags |= GC_IS_REFERENCED;       return !(m->flags & GC_NOT_REFERENCED);   }      int gc_external_mark3(void *a, void *in, char *where)   {