pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.193 2003/04/15 17:01:02 mast Exp $ + || $Id: gc.c,v 1.194 2003/07/16 14:10:12 mast Exp $   */      #include "global.h"      struct callback *gc_evaluator_callback=0;      #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"
pike.git/src/gc.c:24:   #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.193 2003/04/15 17:01:02 mast Exp $"); + RCSID("$Id: gc.c,v 1.194 2003/07/16 14:10:12 mast 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 2000000000   #define MULTIPLIER 0.9
pike.git/src/gc.c:2733: Inside #if defined(PIKE_DEBUG)
   gc_internal_program = (struct program *) (ptrdiff_t) -1;    gc_internal_object = (struct object *) (ptrdiff_t) -1;       if(fatal_after_gc) Pike_fatal("%s", fatal_after_gc);   #endif       Pike_in_gc=GC_PASS_KILL;    /* Destruct the live objects in cycles, but first warn about any bad    * cycles. */    pre_kill_objs = num_objects; -  if (last_cycle) { +  if (last_cycle && Pike_interpreter.evaluator_stack) {    objs -= num_objects;    warn_bad_cycles();    objs += num_objects;    }   #ifdef PIKE_DEBUG    destroy_count = 0;   #endif    while (kill_list) {    struct gc_frame *next = NEXT(kill_list);    struct object *o = (struct object *) kill_list->data;