pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:23:   #include "constants.h"   #include "interpret.h"   #include "bignum.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.120 2000/08/12 23:06:53 grubba Exp $"); + RCSID("$Id: gc.c,v 1.121 2000/08/13 15:12:55 grubba Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is    * garbage.    */      #define GC_CONST 20   #define MIN_ALLOC_THRESHOLD 1000   #define MAX_ALLOC_THRESHOLD 10000000   #define MULTIPLIER 0.9
pike.git/src/gc.c:1820:    struct gc_frame *p;    unsigned cycle = 0;    obj_arr = allocate_array(0);       for (p = kill_list; p;) {    if ((cycle = CYCLE(p))) {    push_object((struct object *) p->data);    obj_arr = append_array(obj_arr, --sp);    }    p = NEXT(p); -  if (p ? CYCLE(p) != cycle : cycle) { +  if (p ? ((unsigned)(CYCLE(p) != cycle)) : cycle) {    if (obj_arr->size >= 2) {    push_constant_text("gc");    push_constant_text("bad_cycle");    push_array(obj_arr);    obj_arr = 0;    SAFE_APPLY_MASTER("runtime_warning", 3);    pop_stack();    obj_arr = allocate_array(0);    }    else obj_arr = resize_array(obj_arr, 0);