pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:22:   #include "time_stuff.h"   #include "constants.h"   #include "interpret.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.105 2000/07/11 03:45:09 mast Exp $"); + RCSID("$Id: gc.c,v 1.106 2000/07/11 04:42:37 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:1023: Inside #if defined(PIKE_DEBUG)
   gc_fatal(a, 1, "Ref counts are wrong.\n");    return 0;   }      int gc_do_weak_free(void *a)   {    struct marker *m;       if (!a) fatal("Got null pointer.\n");    if (Pike_in_gc != GC_PASS_MARK && Pike_in_gc != GC_PASS_CYCLE && -  !(Pike_in_gc == GC_PASS_FREE && gc_ext_weak_refs)) +  Pike_in_gc != GC_PASS_FREE)    fatal("gc_do_weak_free() called in invalid gc pass.\n");    if (gc_debug) {    if (!(m = find_marker(a)))    gc_fatal(a, 0, "gc_do_weak_free() got unknown object.\n");    }    else m = get_marker(a);    debug_malloc_touch(a);       if (m->weak_refs > m->refs)    gc_fatal(a, 0, "More weak references than internal references.\n");
pike.git/src/gc.c:1061: Inside #if defined(PIKE_DEBUG)
  }      #endif /* PIKE_DEBUG */      int gc_mark(void *a)   {    struct marker *m = get_marker(debug_malloc_pass(a));      #ifdef PIKE_DEBUG    if (!a) fatal("Got null pointer.\n"); -  if (Pike_in_gc != GC_PASS_MARK && -  !(Pike_in_gc == GC_PASS_FREE && gc_ext_weak_refs)) +  if (Pike_in_gc != GC_PASS_MARK && Pike_in_gc != GC_PASS_FREE)    fatal("gc mark attempted in invalid pass.\n");    if (!*(INT32 *) a)    gc_fatal(a, 0, "Marked a thing without refs.\n");    if (m->weak_refs == -1)    gc_fatal(a, 0, "Marking thing scheduled for weak free.\n");    if (Pike_in_gc == GC_PASS_FREE && !(m->flags & GC_MARKED))    gc_fatal(a, 0, "gc_mark() called for thing in free pass "    "that wasn't marked before.\n");   #endif