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.67 2000/04/15 07:45:52 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.68 2000/04/15 08:15:49 hubbe Exp $");      /* Run garbage collect approximate every time we have    * 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:584: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr," has %ld references, while gc() found %ld + %ld external.\n",(long)*(INT32 *)a,(long)m->refs,(long)m->xrefs);    describe(a);    locate_references(a);    fprintf(stderr,"##### Continuing search for more bugs....\n");    fatal_after_gc="Reference to object to free in referenced object!\n";    }    }    return 0;    }    +  if(m->saved_refs != -1) +  if(m->saved_refs != *(INT32 *)a) +  fatal("Refs changed in gc()\n");    m->saved_refs = *(INT32 *)a;   #endif       m->flags |= GC_CHECKED;    return add_ref(m);   }      static void init_gc(void)   {   #if 0