summaryrefslogtreecommitdiff
path: root/libguile/guardians.c
diff options
context:
space:
mode:
authorMichael Livshin <mlivshin@bigfoot.com>2000-12-28 14:26:12 +0000
committerMichael Livshin <mlivshin@bigfoot.com>2000-12-28 14:26:12 +0000
commitc275ccf59e31d76edf35385e62d6b82c0da2543d (patch)
tree3e3110df247b5e270b8a2dd4045b2d00f769e891 /libguile/guardians.c
parent0209177b7762f923d0cc56e9cf710f267263d259 (diff)
downloadguile-c275ccf59e31d76edf35385e62d6b82c0da2543d.tar.gz
* guardians.c (mark_dependencies_in_tconc): new function.
(mark_dependencies): bug fix. mark the dependencies of the known zombies, too. duh.
Diffstat (limited to 'libguile/guardians.c')
-rw-r--r--libguile/guardians.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libguile/guardians.c b/libguile/guardians.c
index 5a53a6222..130b3e1df 100644
--- a/libguile/guardians.c
+++ b/libguile/guardians.c
@@ -320,15 +320,15 @@ guardian_gc_init (void *dummy1, void *dummy2, void *dummy3)
}
static void
-mark_dependencies (guardian_t *g)
+mark_dependencies_in_tconc (tconc_t *tc)
{
SCM pair, next_pair;
SCM *prev_ptr;
- /* scan the live list for unmarked objects, and mark their
+ /* scan the list for unmarked objects, and mark their
dependencies */
- for (pair = g->live.head, prev_ptr = &g->live.head;
- ! SCM_EQ_P (pair, g->live.tail);
+ for (pair = tc->head, prev_ptr = &tc->head;
+ ! SCM_EQ_P (pair, tc->tail);
pair = next_pair)
{
SCM obj = SCM_CAR (pair);
@@ -364,6 +364,13 @@ mark_dependencies (guardian_t *g)
}
static void
+mark_dependencies (guardian_t *g)
+{
+ mark_dependencies_in_tconc (&g->zombies);
+ mark_dependencies_in_tconc (&g->live);
+}
+
+static void
mark_and_zombify (guardian_t *g)
{
SCM tconc_tail = g->live.tail;