pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:526:    free((char *)m);    }       destruct_objects_to_destruct();       objects_freed -= (double) num_objects;       tmp=(double)num_objects;    tmp=tmp * GC_CONST/100.0 * (objects_alloced+1.0) / (objects_freed+1.0);    -  if((int)tmp < alloc_threshold + num_allocs) -  { -  alloc_threshold=(int)tmp; -  }else{ -  alloc_threshold+=num_allocs; -  } +  if(alloc_threshold + num_allocs <= tmp) +  tmp = (double)(alloc_threshold + num_allocs);    -  if(alloc_threshold < MIN_ALLOC_THRESHOLD) -  alloc_threshold = MIN_ALLOC_THRESHOLD; -  if(alloc_threshold > MAX_ALLOC_THRESHOLD) -  alloc_threshold = MAX_ALLOC_THRESHOLD; +  if(tmp < MIN_ALLOC_THRESHOLD) +  tmp = (double)MIN_ALLOC_THRESHOLD; +  if(tmp > MAX_ALLOC_THRESHOLD) +  tmp = (double)MAX_ALLOC_THRESHOLD; +  +  alloc_threshold = (int)tmp; +     num_allocs=0;      #ifdef DEBUG    if(t_flag)    fprintf(stderr,"done (freed %ld of %ld objects).\n",    (long)(tmp2-num_objects),(long)tmp2);   #endif      #ifdef ALWAYS_GC    ADD_GC_CALLBACK();   #else    if(d_flag > 3) ADD_GC_CALLBACK();   #endif    in_gc=0;   }