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.146 2001/02/28 04:20:17 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.147 2001/03/22 02:21:15 hubbe 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:1082: Inside #if defined(PIKE_DEBUG)
      Pike_in_gc = orig_in_gc;    if(!Pike_in_gc)    exit_gc();    d_flag=tmp;   }   #endif      #ifdef PIKE_DEBUG    - void gc_add_extra_ref(void *a) + void debug_gc_add_extra_ref(void *a)   {    struct marker *m = get_marker(a);    if (m->flags & GC_GOT_EXTRA_REF)    gc_fatal(a, 0, "Thing already got an extra gc ref.\n");    m->flags |= GC_GOT_EXTRA_REF;    gc_extra_refs++;    ++*(INT32 *) a;   }    - void gc_free_extra_ref(void *a) + void debug_gc_free_extra_ref(void *a)   {    struct marker *m = get_marker(a);    if (!(m->flags & GC_GOT_EXTRA_REF))    gc_fatal(a, 0, "Thing haven't got an extra gc ref.\n");    m->flags &= ~GC_GOT_EXTRA_REF;    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");       if (gc_debug) {    m = find_marker(a);    if ((!m || !(m->flags & GC_PRETOUCHED)) &&