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.258 2006/02/18 05:08:24 mast Exp $ + || $Id: gc.c,v 1.259 2006/02/25 03:59:41 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:26:   #include "interpret.h"   #include "bignum.h"   #include "pike_threadlib.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.258 2006/02/18 05:08:24 mast Exp $"); + RCSID("$Id: gc.c,v 1.259 2006/02/25 03:59:41 mast Exp $");      int gc_enabled = 1;      /* These defaults are only guesses and hardly tested at all. Please improve. */   double gc_garbage_ratio_low = 0.2;   double gc_time_ratio = 0.05;   double gc_garbage_ratio_high = 0.5;      /* This slowness factor approximately corresponds to the average over    * the last ten gc rounds. (0.9 == 1 - 1/10) */
pike.git/src/gc.c:1972:    m->weak_refs = 0;    }    m->flags = (m->flags & ~GC_NOT_REFERENCED) | GC_MARKED;    DO_IF_DEBUG(marked++);    return 1;    }   }      void gc_move_marker (void *old, void *new)   { -  struct marker *m = get_marker (debug_malloc_pass (old)); +  struct marker *m = get_marker (old);      #ifdef PIKE_DEBUG    if (!old) Pike_fatal("Got null pointer in old.\n");    if (!new) Pike_fatal("Got null pointer in new.\n");    if (!m) Pike_fatal ("Have no marker for old block %p.\n", old);    if (find_marker (new))    Pike_fatal ("New block %p already got a marker.\n", new);    if (!Pike_in_gc || Pike_in_gc >= GC_PASS_FREE)    Pike_fatal ("gc move mark attempted in invalid pass.\n");   #endif    -  move_marker (m, new); +  move_marker (m, debug_malloc_pass (new));   }      PMOD_EXPORT void gc_cycle_enqueue(gc_cycle_check_cb *checkfn, void *data, int weak)   {    struct gc_frame *l = alloc_gc_frame();   #ifdef PIKE_DEBUG    {    struct marker *m;    if (gc_is_watching && (m = find_marker(data)) && m->flags & GC_WATCHED) {    /* This is useful to set breakpoints on. */