2000-07-03
2000-07-03 16:50:09 by Martin Stjernholm <mast@lysator.liu.se>
-
0816299195aff513b507a0313f973974b415b6ec
(18 lines)
(+12/-6)
[
Show
| Annotate
]
Branch: 7.9
GC fixes: Ensure that no refs change during the check pass (and only during
the check pass). saved_refs is back again.
Rev: src/gc.c:1.99
Rev: src/gc.h:1.52
Rev: src/mapping.c:1.88
5:
\*/
/**/
#include "global.h"
- RCSID("$Id: mapping.c,v 1.87 2000/06/20 03:26:16 hubbe Exp $");
+ RCSID("$Id: mapping.c,v 1.88 2000/07/03 16:50:09 mast Exp $");
#include "main.h"
#include "object.h"
#include "mapping.h"
840: Inside #if defined(PIKE_DEBUG)
fatal("Zero refs in mapping->data\n");
if(d_flag>1) check_mapping(m);
debug_malloc_touch(m);
+ if (Pike_in_gc > GC_PASS_PREPARE && Pike_in_gc != GC_PASS_MARK)
+ fatal("check_mapping_for_destruct called in wrong pass inside gc.\n");
#endif
/* no is_eq -> no locking */
1871:
#endif
if(gc_mark(m)) {
+ check_mapping_for_destruct(m);
if (m == gc_mark_mapping_pos)
gc_mark_mapping_pos = m->next;
if (m == gc_internal_mapping)
1971:
debug_gc_check_svalues(&k->val, 1, T_MAPPING, m);
}
}
-
- check_mapping_for_destruct(m);
+
}
}
2022:
gc_mark_mapping_pos = m->next;
if(gc_is_referenced(m))
gc_mark_mapping_as_referenced(m);
+ else
+ /* Done in gc_mark_mapping_as_referenced() otherwise (and it has
+ * to be done there). */
+ check_mapping_for_destruct(m);
}
}