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

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.224 2000/04/22 13:20:39 mast Exp $"); + RCSID("$Id: program.c,v 1.225 2000/04/22 18:48:58 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
660:    MEMSET(p, 0, sizeof(struct program));    p->alignment_needed=1;    -  GC_ALLOC(); +  GC_ALLOC(p);    p->refs=1;    p->id=++current_program_id;   
755:   #else    fake_object=ALLOC_STRUCT(object);   #endif -  GC_ALLOC(); +  GC_ALLOC(fake_object);       fake_object->next=fake_object;    fake_object->prev=fake_object;
942:    FREE_PROT(p);    dmfree((char *)p);    -  GC_FREE(p); +  GC_FREE();   }      #ifdef PIKE_DEBUG
3344:   static void gc_check_frame(struct pike_frame *f)   {    if(!f) return; -  if(!debug_gc_check_nongarbed(f,T_UNKNOWN,f) && f->malloced_locals) +  if(!debug_gc_check(f,T_UNKNOWN,f) && f->malloced_locals)    {    if(f->current_object) gc_check(f->current_object);    if(f->context.prog) gc_check(f->context.prog);