pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:23:   #include "constants.h"   #include "interpret.h"   #include "bignum.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.171 2001/08/20 18:33:51 mast Exp $"); + RCSID("$Id: gc.c,v 1.172 2001/08/30 23:21:54 mast Exp $");      /* Run garbage collect approximately every time    * 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:537:    }    }       if(memblock && depth>0)    describe_something(memblock,type,indent+2,depth-1,flags | DESCRIBE_MEM,inblock);      #ifdef DEBUG_MALLOC    /* FIXME: Is the following call correct?    * Shouldn't the second argument be an offset?    */ -  dmalloc_describe_location(descblock, location, indent); +  /* dmalloc_describe_location(descblock, location, indent); */ +  /* My attempt to fix it, although I'm not really sure: /mast */ +  if (memblock) +  dmalloc_describe_location(memblock, (char *) location - (char *) memblock, indent);   #endif   }      static void describe_gc_frame(struct gc_frame *l)   {    if (l->frameflags & GC_POP_FRAME)    fprintf(stderr, "back=%p, prev=%p, next=%p, data=%p, cycle=%u, flags=0x%02x",    l->back, PREV(l), NEXT(l), l->data, CYCLE(l), l->frameflags);    else    fprintf(stderr, "LINK back=%p, data=%p, weak=%d, flags=0x%02x",
pike.git/src/gc.c:1217:    init_marker_hash();    get_marker(rec_list.data); /* Used to simplify fencepost conditions. */   #ifdef PIKE_DEBUG    }   #endif   }      static void exit_gc(void)   {   #ifdef DO_PIKE_CLEANUP -  int e=0; +  size_t e=0;    struct marker *h;    for(e=0;e<marker_hash_table_size;e++)    while(marker_hash_table[e])    remove_marker(marker_hash_table[e]->data);   #endif   #ifdef PIKE_DEBUG    if (gc_is_watching) {    fprintf(stderr, "## Exiting gc and resetting watches for %d things.\n",    gc_is_watching);    gc_is_watching = 0;