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.77 2000/04/21 23:07:10 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.78 2000/04/22 02:23:56 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:583: Inside #if defined(PIKE_DEBUG)
   if(check_for == (void *)1 && gc_do_free(a))    {    struct marker *m=get_marker(a);    int t=attempt_to_identify(a);    if(t != T_STRING && t != T_UNKNOWN)    {    fprintf(stderr,"**Reference to object to free in referenced object!\n");    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); + #if 1 +  fatal("Reference to object to free in referenced object!\n"); + #else    fprintf(stderr,"##### Continuing search for more bugs....\n");    fatal_after_gc="Reference to object to free in referenced object!\n"; -  + #endif    }    }    return 0;    }       if (Pike_in_gc /100 != 1)    fatal("gc check attempted in pass %d.\n", Pike_in_gc);       if(m->saved_refs != -1)    if(m->saved_refs != *(INT32 *)a) {
pike.git/src/gc.c:783: Inside #if defined(PIKE_DEBUG)
   {    struct marker *m=get_marker(a);    int t=attempt_to_identify(a);    if(t != T_STRING && t != T_UNKNOWN)    {    fprintf(stderr,"EXTERNAL Reference to object to free%s!\n",in?(char *)in:"");    fprintf(stderr," has %ld references, while gc() found %ld + %ld external.\n",(long)*(INT32 *)a,(long)m->refs,(long)m->xrefs);    if(where) describe_location(0,T_UNKNOWN,where,4,1,0);    describe(a);    locate_references(a); + #if 1 +  fatal("EXTERNAL Reference to object to free.\n"); + #else    fprintf(stderr,"##### Continuing search for more bugs....\n");    fatal_after_gc="EXTERNAL Reference to object to free.\n"; -  + #endif    }    }       return 0;    }    m=get_marker(a);    m->xrefs++;    m->flags|=GC_XREFERENCED;    gc_is_referenced(a);    return 0;