Branch: Tag:

2000-04-23

2000-04-23 03:01:26 by Martin Stjernholm <mast@lysator.liu.se>

GC fixes. Made the gc quite a bit more whiny when -d is used.

Rev: src/array.c:1.68
Rev: src/array.h:1.19
Rev: src/gc.c:1.79
Rev: src/gc.h:1.38
Rev: src/mapping.c:1.79
Rev: src/mapping.h:1.24
Rev: src/multiset.c:1.20
Rev: src/multiset.h:1.10
Rev: src/object.c:1.120
Rev: src/object.h:1.45
Rev: src/program.c:1.232
Rev: src/program.h:1.87
Rev: src/svalue.c:1.72
Rev: src/threads.h:1.89

23:   #include "stuff.h"   #include "bignum.h"    - RCSID("$Id: array.c,v 1.67 2000/04/20 02:41:44 hubbe Exp $"); + RCSID("$Id: array.c,v 1.68 2000/04/23 03:01:25 mast Exp $");      struct array empty_array=   {
57:    return &empty_array;    }    -  GC_ALLOC(); -  +     v=(struct array *)malloc(sizeof(struct array)+    (size+extra_space-1)*sizeof(struct svalue));    if(!v)    error("Couldn't allocate array, out of memory.\n");    -  +  GC_ALLOC(v);    -  +     /* for now, we don't know what will go in here */    v->type_field=BIT_MIXED | BIT_UNFINISHED;    v->flags=0;
104:       free((char *)v);    -  GC_FREE(v); +  GC_FREE();   }      /*
1817:    }   }    + #ifdef PIKE_DEBUG + INT32 gc_touch_all_arrays(void) + { +  INT32 n = 0; +  struct array *a = &empty_array; +  do { +  debug_gc_touch(a); +  n++; +  a=a->next; +  } while (a != &empty_array); +  return n; + } + #endif +    void gc_check_all_arrays(void)   {    struct array *a;