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.150 2001/04/18 17:34:19 mast Exp $"); + RCSID("$Id: gc.c,v 1.151 2001/05/19 05:30:18 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:1979:    struct array *a;    struct multiset *l;    struct mapping *m;    struct program *p;    struct object *o;   #ifdef PIKE_DEBUG   #ifdef HAVE_GETHRTIME    hrtime_t gcstarttime = 0;   #endif    unsigned destroy_count, obj_count; +  ONERROR uwp;   #endif       if(Pike_in_gc) return 0;    init_gc();    Pike_in_gc=GC_PASS_PREPARE;   #ifdef PIKE_DEBUG    gc_debug = d_flag; -  +  SET_ONERROR(uwp, fatal_on_error, "Shouldn't get an exception inside the gc.\n");   #endif       destruct_objects_to_destruct();       if(gc_evaluator_callback)    {    remove_callback(gc_evaluator_callback);    gc_evaluator_callback=0;    }   
pike.git/src/gc.c:2346:    if(tmp < MIN_ALLOC_THRESHOLD)    tmp = (double)MIN_ALLOC_THRESHOLD;    if(tmp > MAX_ALLOC_THRESHOLD)    tmp = (double)MAX_ALLOC_THRESHOLD;       alloc_threshold = (ptrdiff_t)tmp;       num_allocs=0;      #ifdef PIKE_DEBUG +  UNSET_ONERROR (uwp);    if(GC_VERBOSE_DO(1 ||) t_flag)    {   #ifdef HAVE_GETHRTIME    fprintf(stderr,"done (freed %ld of %ld objects), %ld ms.\n",    (long)objs,(long)objs + num_objects,    (long)((gethrtime() - gcstarttime)/1000000));   #else    fprintf(stderr,"done (freed %ld of %ld objects)\n",    (long)objs,(long)objs + num_objects);   #endif