pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:3998: Inside #if defined(GC_INTERVAL_DEBUG)
   fprintf (stderr, " strategy: high ratio %g, objs %"PRINTSIZET"u, "    "new threshold -> %.12g\n",    gc_garbage_ratio_high, start_num_objs, new_threshold);   #endif    }       if (non_gc_time > 0.0 && gc_min_time_ratio > 0.0) {    /* Upper limit on the new threshold based on gc_min_time_ratio. */    double max_threshold = (objects_alloced+1.0) *    gc_time / (gc_min_time_ratio * non_gc_time); -  if (max_threshold < new_threshold) { -  new_threshold = max_threshold; -  last_garbage_strategy = GARBAGE_MAX_INTERVAL; -  } +    #ifdef GC_INTERVAL_DEBUG    fprintf (stderr, " max interval? min time ratio %g, "    "max threshold %.12g -> %s\n",    gc_min_time_ratio, max_threshold,    max_threshold < new_threshold ? "yes" : "no");   #endif -  +  if (max_threshold < new_threshold) { +  new_threshold = max_threshold; +  last_garbage_strategy = GARBAGE_MAX_INTERVAL;    } -  +  }      #if 0    /* Afaics this is to limit the growth of the threshold to avoid    * that a single sudden allocation spike causes a very long gc    * interval the next time. Now when the bug in the decaying    * average calculation is fixed there should be no risk for that,    * at least not in any case when this would help. /mast */    if(alloc_threshold + start_allocs < new_threshold)    new_threshold = (double)(alloc_threshold + start_allocs);   #endif