Branch: Tag:

2000-06-12

2000-06-12 23:00:32 by Martin Stjernholm <mast@lysator.liu.se>

Guess what? This time it's a gc bugfix.

Rev: src/gc.c:1.96
Rev: src/testsuite.in:1.303

29:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.95 2000/06/12 21:41:41 mast Exp $"); + RCSID("$Id: gc.c,v 1.96 2000/06/12 23:00:31 mast Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is
1254:    if (cycle == gc_rec_last->cycle)    CYCLE_DEBUG_MSG(m, "gc_cycle_push, old cycle");    else { +  unsigned replace_cycle = gc_rec_last->cycle;    CYCLE_DEBUG_MSG(m, "gc_cycle_push, cycle"); -  for (p = m;; p = p->link) { +  for (p = m; p != gc_rec_last; p = p->link) {    p->cycle = cycle;    CYCLE_DEBUG_MSG(p, "gc_cycle_push, mark cycle"); -  if (p == gc_rec_last) break; +  } +  if (replace_cycle != cycle) +  for (; p && p->cycle == replace_cycle; p = p->link) { +  p->cycle = cycle; +  CYCLE_DEBUG_MSG(p, "gc_cycle_push, re-mark cycle");    }}}} /* Mmm.. lisp ;) */       else /* A forward reference. */