pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.191 2002/12/07 16:10:34 grubba Exp $ + || $Id: gc.c,v 1.192 2003/01/09 15:21:26 grubba Exp $   */      #include "global.h"      struct callback *gc_evaluator_callback=0;      #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"
pike.git/src/gc.c:24:   #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.191 2002/12/07 16:10:34 grubba Exp $"); + RCSID("$Id: gc.c,v 1.192 2003/01/09 15:21:26 grubba 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:2459:    if(gc_evaluator_callback)    {    remove_callback(gc_evaluator_callback);    gc_evaluator_callback=0;    }       objs=num_objects;    last_cycle = 0;      #ifdef PIKE_DEBUG -  if(GC_VERBOSE_DO(1 ||) t_flag) { +  if(GC_VERBOSE_DO(1 ||) Pike_interpreter.trace_level) {    fprintf(stderr,"Garbage collecting ... ");    GC_VERBOSE_DO(fprintf(stderr, "\n"));   #ifdef HAVE_GETHRTIME    gcstarttime = gethrtime();   #endif    }    if(num_objects < 0)    Pike_fatal("Panic, less than zero objects!\n");   #endif   
pike.git/src/gc.c:2836:    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) +  if(GC_VERBOSE_DO(1 ||) Pike_interpreter.trace_level)    {   #ifdef HAVE_GETHRTIME    fprintf(stderr,    "done (freed %"PRINTPTRDIFFT"d of %"PRINTPTRDIFFT"d things), %ld ms.\n",    objs, objs + num_objects, (long)((gethrtime() - gcstarttime)/1000000));   #else    fprintf(stderr,    "done (freed %"PRINTPTRDIFFT"d of %"PRINTPTRDIFFT"d things)\n",    objs, objs + num_objects);   #endif