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.68 2000/04/15 08:15:49 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.69 2000/04/17 21:06:24 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:478:    }else{    fprintf(stderr,"%*s** \"%s\"\n",indent,"",s->str);    }    break;    }    }   }      void describe_something(void *a, int t, int indent, int depth, int flags)   { +  int tmp;    struct program *p=(struct program *)a;    if(!a) return;       if(t==-1)    {    fprintf(stderr,"%*s**Location description: %s\n",indent,"",(char *)a);    return;    }    -  +  /* Disable debug, this may help reduce recursion bugs */ +  tmp=d_flag; +  d_flag=0; +    #ifdef DEBUG_MALLOC    if (((int)a) == 0x55555555) {    fprintf(stderr,"%*s**Location: %p Type: %s Zapped pointer\n",indent,"",a,    get_name_of_type(t));    } else   #endif /* DEBUG_MALLOC */    if (((int)a) & 3) {    fprintf(stderr,"%*s**Location: %p Type: %s Missaligned address\n",indent,"",a,    get_name_of_type(t));    } else {
pike.git/src/gc.c:511:       low_describe_something(a,t,indent,depth,flags);      #ifdef DEBUG_MALLOC    if(!(flags & DESCRIBE_NO_DMALLOC))    debug_malloc_dump_references(a,indent+2,depth-1,flags);   #endif          fprintf(stderr,"%*s*******************\n",indent,""); +  d_flag=tmp;   }      void describe(void *x)   {    describe_something(x, attempt_to_identify(x), 0, 2, 0);   }      void debug_describe_svalue(struct svalue *s)   {    fprintf(stderr,"Svalue at %p is:\n",s);