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.70 2000/04/19 14:02:16 mast Exp $"); + RCSID("$Id: gc.c,v 1.71 2000/04/19 18:06:45 mast 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:121: Inside #if defined(PIKE_DEBUG)
   return T_STRING;       return T_UNKNOWN;   }      void *check_for =0;   static char *found_where="";   static void *found_in=0;   static int found_in_type=0;   void *gc_svalue_location=0; - static char *fatal_after_gc=0; + char *fatal_after_gc=0;      #define DESCRIBE_MEM 1   #define DESCRIBE_NO_REFS 2   #define DESCRIBE_SHORT 4   #define DESCRIBE_NO_DMALLOC 8      /* type == -1 means that memblock is a char* and should be    * really be printed..    */   void describe_location(void *real_memblock,
pike.git/src/gc.c:559:    fprintf(stderr," Function in destructed object.\n");    }    }else{    fprintf(stderr," Function name: %s\n",ID_FROM_INT(s->u.object->prog,s->subtype)->name->str);    }    }    }    describe_something(s->u.refs,s->type,0,2,0);   }    - #endif + #endif /* PIKE_DEBUG */      INT32 real_gc_check(void *a)   {    struct marker *m=get_marker(a);      #ifdef PIKE_DEBUG    if(check_for)    {    if(check_for == a)    {
pike.git/src/gc.c:703: Inside #if defined(PIKE_DEBUG) and #if defined(DEBUG_MALLOC)
  #ifdef DEBUG_MALLOC    {    extern void dmalloc_find_references_to(void *);   #if 0    fprintf(stderr,"**DMALLOC Looking for references:\n");    dmalloc_find_references_to(a);   #endif    }   #endif    -  +     if(!Pike_in_gc)    exit_gc();   }   #endif      #ifdef PIKE_DEBUG      int debug_gc_is_referenced(void *a)   {    struct marker *m;
pike.git/src/gc.c:752: Inside #if defined(PIKE_DEBUG)
      return m->refs < *(INT32 *)a;   }   #endif      #ifdef PIKE_DEBUG   int gc_external_mark3(void *a, void *in, char *where)   {    struct marker *m;    -  if (Pike_in_gc <= 0 || Pike_in_gc >= 4) -  fatal("gc_external_mark3 called outside valid gc pass.\n"); -  +     if(check_for)    {    if(a==check_for)    {    char *tmp=found_where;    void *tmp2=found_in;       if(where) found_where=where;    if(in) found_in=in;