Branch: Tag:

2000-04-13

2000-04-13 12:16:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed(?) anomaly between gc_check_frame() and gc_mark_frame().
Added some more DMALLOC in gc_*().

Rev: src/program.c:1.225

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.224 2000/04/13 02:11:25 hubbe Exp $"); + RCSID("$Id: program.c,v 1.225 2000/04/13 12:16:14 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
3349:    if(f->current_object) gc_check(f->current_object);    if(f->context.prog) gc_check(f->context.prog);    if(f->context.parent) gc_check(f->context.parent); -  gc_check_svalues(f->locals,f->num_locals); +  if(f->malloced_locals)gc_check_svalues(f->locals,f->num_locals);    if(f->scope) gc_check_frame(f->scope);    }   }
3443: Inside #if defined(GC2)
     void gc_mark_program_as_referenced(struct program *p)   { +  debug_malloc_touch(p); +     if(gc_mark(p))    {    int e;
3518:   void gc_mark_all_programs(void)   {    struct program *p; -  for(p=first_program;p;p=p->next) -  if(gc_is_referenced(p)) -  gc_mark_program_as_referenced(p); +  for(p=first_program;p;p=p->next) { +  if(gc_is_referenced(p)) { +  gc_mark_program_as_referenced(debug_malloc_pass(p));    } -  +  } + }      void gc_free_all_unreferenced_programs(void)   {
3529:       for(p=first_program;p;p=next)    { +  debug_malloc_touch(p); +     if(gc_do_free(p))    {    int e;