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.147 2001/03/22 02:21:15 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.148 2001/03/28 10:02:41 hubbe 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:955:   {    struct marker *m;    INT32 ret;      #ifdef PIKE_DEBUG    if (!(m = gc_check_debug(a, 0))) return 0;   #else    m = get_marker(a);   #endif    -  ret = add_ref(m); +  ret=m->refs; +  add_ref(m);    if (m->refs >= *(INT32 *) a)    m->flags |= GC_NOT_REFERENCED;    return ret;   }      INT32 real_gc_check_weak(void *a)   {    struct marker *m;    INT32 ret;   
pike.git/src/gc.c:983:    gc_fatal(a, 1, "Thing has gotten more weak refs than internal refs.\n");   #else    m = get_marker(a);   #endif       m->weak_refs++;    gc_ext_weak_refs++;    if (m->weak_refs >= *(INT32 *) a)    m->weak_refs = -1;    -  ret = add_ref(m); +  ret=m->refs; +  add_ref(m);    if (m->refs >= *(INT32 *) a)    m->flags |= GC_NOT_REFERENCED;    return ret;   }      static void init_gc(void)   {    init_marker_hash();    get_marker(rec_list.data); /* Used to simplify fencepost conditions. */   }