pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:194:    67108863, /* ~ 2^26 = 67108864 */    134217727, /* ~ 2^27 = 134217728 */    268435455, /* ~ 2^28 = 268435456 */    536870911, /* ~ 2^29 = 536870912 */    1073741823,/* ~ 2^30 = 1073741824 */    2147483647,/* ~ 2^31 = 2147483648 */   };      void do_gc()   { +  static int in_gc = 0;    double tmp;    INT32 tmp2;    struct marker_chunk *m;    -  +  if(in_gc) return; +  in_gc=1; +  +  remove_callback(gc_evaluator_callback); +  gc_evaluator_callback=0; +     tmp2=num_objects;      #ifdef DEBUG    if(t_flag)    fprintf(stderr,"Garbage collecting ... ");    if(num_objects < 0)    fatal("Panic, less than zero objects!\n");   #endif       objects_alloced*=MULTIPLIER;
pike.git/src/gc.c:279:    alloc_threshold = MAX_ALLOC_THRESHOLD;    num_allocs=0;      #ifdef DEBUG    if(t_flag)    fprintf(stderr,"done (freed %ld of %ld objects).\n",    (long)(tmp2-num_objects),(long)tmp2);   #endif      #ifndef ALWAYS_GC -  if(d_flag < 3 && gc_evaluator_callback) -  { -  remove_callback(gc_evaluator_callback); -  gc_evaluator_callback=0; -  } +  ADD_GC_CALLBACK(); + #else +  if(d_flag > 3) ADD_GC_CALLBCK();   #endif -  +  in_gc=0;   }      #endif