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.123 2000/08/16 22:03:40 mast Exp $"); + RCSID("$Id: gc.c,v 1.124 2000/08/17 18:57:37 grubba 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:2134: Inside #if defined(PIKE_DEBUG)
   n += gc_touch_all_programs();    n += gc_touch_all_objects();    if (n != (unsigned) num_objects)    fatal("Object count wrong after gc; expected %d, got %d.\n", num_objects, n);    GC_VERBOSE_DO(fprintf(stderr, "| posttouch: %u things\n", n));    if(fatal_after_gc) fatal(fatal_after_gc);    }    if (gc_extra_refs)    fatal("Lost track of %d extra refs to things in gc.\n", gc_extra_refs);    if (gc_ext_weak_refs) -  fatal("Still got %u external weak references to internal things in gc.\n", -  gc_ext_weak_refs); +  fatal("Still got %lu external weak references to internal things in gc.\n", +  (unsigned long)PTRDIFF_T_TO_LONG(gc_ext_weak_refs));   #endif       Pike_in_gc=0;    exit_gc();       /* It's possible that more things got allocated in the kill pass    * than were freed. The count before that is a better measurement    * then. */    if (pre_kill_objs < num_objects) objs -= pre_kill_objs;    else objs -= num_objects;