pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      #include "global.h"      #ifdef GC2    + struct callback *gc_evaluator_callback=0; +    #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"   #include "program.h"      #include "gc.h"   #include "main.h"      /* Run garbage collect approximate every time we have
pike.git/src/gc.c:190:    16777215, /* ~ 2^24 = 16777216 */    33554431, /* ~ 2^25 = 33554432 */    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(void) + void do_gc()   {    double tmp;    INT32 tmp2;    struct marker_chunk *m;       tmp2=num_objects;      #ifdef DEBUG    if(t_flag)    fprintf(stderr,"Garbage collecting ... ");
pike.git/src/gc.c:275:    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 +  + #ifndef ALWAYS_GC +  if(d_flag < 3 && gc_evaluator_callback) +  { +  remove_callback(gc_evaluator_callback); +  gc_evaluator_callback=0;    } -  + #endif + }      #endif