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.202 2003/02/09 15:30:57 mast Exp $ + || $Id: gc.c,v 1.203 2003/02/10 10:53:25 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:26:   #include "interpret.h"   #include "bignum.h"   #include "pike_threadlib.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.202 2003/02/09 15:30:57 mast Exp $"); + RCSID("$Id: gc.c,v 1.203 2003/02/10 10:53:25 grubba Exp $");      int gc_enabled = 1;      /* These defaults are only guesses and hardly tested at all. Please improve. */   double gc_garbage_ratio_low = 0.2;   double gc_time_ratio = 0.05;   double gc_garbage_ratio_high = 0.5;      /* This slowness factor approximately corresponds to the average over    * the last ten gc rounds. (0.9 == 1 - 1/10) */
pike.git/src/gc.c:2903:   #endif       if(new_threshold < GC_MIN_ALLOC_THRESHOLD)    new_threshold = (double) GC_MIN_ALLOC_THRESHOLD;    else if(new_threshold > GC_MAX_ALLOC_THRESHOLD)    new_threshold = (double) GC_MAX_ALLOC_THRESHOLD;       alloc_threshold = (ptrdiff_t)new_threshold;       if (!explicit_call && last_gc_time != (cpu_time_t) -1) { - #if CPU_TIME_IS_THREAD_LOCAL == YES + #if defined(PIKE_THREADS) && (CPU_TIME_IS_THREAD_LOCAL == YES)    OBJ2THREAD(Pike_interpreter.thread_id)->auto_gc_time += last_gc_time; - #elif CPU_TIME_IS_THREAD_LOCAL == NO + #elif !defined(PIKE_THREADS) || (CPU_TIME_IS_THREAD_LOCAL == NO)    auto_gc_time += last_gc_time;   #endif    }       if(GC_VERBOSE_DO(1 ||) gc_trace)    {    if (last_gc_time != (cpu_time_t) -1)    fprintf(stderr, "done (%"PRINTSIZET"d of %"PRINTSIZET"d "    "was unreferenced), %ld ms.\n",    unreferenced, start_num_objs,