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.125 2000/08/22 17:20:38 grubba Exp $"); + RCSID("$Id: gc.c,v 1.126 2000/08/23 18:49:45 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:2067:    GC_VERBOSE_DO(fprintf(stderr, "| free: %d really freed, %u left with live references\n",    obj_count - num_objects, live_ref));       gc_internal_array = &empty_array;    gc_internal_multiset = 0;    gc_internal_mapping = 0;    gc_internal_program = 0;    gc_internal_object = 0;      #ifdef PIKE_DEBUG -  if(fatal_after_gc) fatal(fatal_after_gc); +  if(fatal_after_gc) fatal("%s", fatal_after_gc);   #endif       /* Pike code may run again now. */       Pike_in_gc=GC_PASS_KILL;    /* Destruct the live objects in cycles, but first warn about any bad    * cycles. */    pre_kill_objs = num_objects;    if (last_cycle) {    objs -= num_objects;
pike.git/src/gc.c:2129: Inside #if defined(PIKE_DEBUG)
   unsigned n;    Pike_in_gc=GC_PASS_POSTTOUCH;    n = gc_touch_all_arrays();    n += gc_touch_all_multisets();    n += gc_touch_all_mappings();    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(fatal_after_gc) fatal("%s", 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 %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();