pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:17:   #include "gc.h"   #include "main.h"      /* Run garbage collect approximate every time we have    * 20 percent of all arrays, objects and programs is    * garbage.    */      #define GC_CONST 20   #define MIN_ALLOC_THRESHOLD 1000 - #defien MAX_ALLOC_THRESHOLD 10000000 + #define MAX_ALLOC_THRESHOLD 10000000   #define MULTIPLIER 0.9   #define MARKER_CHUNK_SIZE 1023      INT32 num_objects;   INT32 num_allocs;   INT32 alloc_threshold = MIN_ALLOC_THRESHOLD;      static double objects_alloced;   static double objects_freed;   
pike.git/src/gc.c:232:       if((int)tmp < alloc_threshold + num_allocs)    {    alloc_threshold=(int)tmp;    }else{    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;    num_allocs=0;      #ifdef DEBUG    if(t_flag)    fprintf(stderr,"done (freed %ld of %ld objects).\n",    (long)(tmp2-num_objects),(long)tmp2);   #endif   }      #endif