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.50 2000/03/07 21:32:17 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.51 2000/03/07 23:23:23 grubba 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:348:   {    struct program *p=(struct program *)a;    if(!a) return;       if(t==-1)    {    fprintf(stderr,"**Location description: %s\n",(char *)a);    return;    }    + #ifdef DEBUG_MALLOC +  if (((int)a) == 0x55555555) { +  fprintf(stderr,"**Location: %p Type: %s Zapped pointer\n",a, +  get_name_of_type(t)); +  } else + #endif /* DEBUG_MALLOC */ +  if (((int)a) & 3) { +  fprintf(stderr,"**Location: %p Type: %s Missaligned address\n",a, +  get_name_of_type(t)); +  } else {    fprintf(stderr,"**Location: %p Type: %s Refs: %d\n",a,    get_name_of_type(t),    *(INT32 *)a); -  +  }       low_describe_something(a,t,dm);      #ifdef DEBUG_MALLOC    if(dm)    debug_malloc_dump_references(a);   #endif          fprintf(stderr,"*******************\n");