Branch: Tag:

2000-04-22

2000-04-22 18:48:58 by Martin Stjernholm <mast@lysator.liu.se>

A both simpler and more robust gc fix. Should also fix a potential bug that
I haven't managed to trig.

Rev: src/array.c:1.65
Rev: src/gc.c:1.57
Rev: src/gc.h:1.27
Rev: src/mapping.c:1.73
Rev: src/multiset.c:1.19
Rev: src/object.c:1.105
Rev: src/program.c:1.225
Rev: src/svalue.c:1.67

23:   #include "stuff.h"   #include "bignum.h"    - RCSID("$Id: array.c,v 1.64 2000/04/22 13:20:39 mast Exp $"); + RCSID("$Id: array.c,v 1.65 2000/04/22 18:48:57 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();   }      /*