author | Camm Maguire <camm@debian.org> | 2014年11月04日 16:15:09 -0500 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2014年11月04日 16:15:09 -0500 |
commit | 6343c167aef8e917790123cccfade7dc16c3cb1a (patch) | |
tree | 599498b130b6ae3e04ac81bd377f3c5e38cfe5af | |
parent | 8124395463d00b936d19bee630503690411eec8c (diff) | |
download | gcl-hashgc.tar.gz |
-rwxr-xr-x | gcl/o/gbc.c | 9 | ||||
-rwxr-xr-x | gcl/o/sgbc.c | 2 |
diff --git a/gcl/o/gbc.c b/gcl/o/gbc.c index 6be9f5fef..764d78640 100755 --- a/gcl/o/gbc.c +++ b/gcl/o/gbc.c @@ -496,10 +496,11 @@ mark_object(object x) { mark_object(x->ht.ht_rhthresh); if (x->ht.ht_self == NULL) break; - for (i = 0, j = x->ht.ht_size; i < j; i++) { - mark_object(x->ht.ht_self[i].hte_key); - mark_object(x->ht.ht_self[i].hte_value); - } + for (i = 0, j = x->ht.ht_size; i < j; i++) + if (x->ht.ht_self[i].hte_key!=OBJNULL) { + mark_object(x->ht.ht_self[i].hte_key); + mark_object(x->ht.ht_self[i].hte_value); + } if (inheap(x->ht.ht_self)) { if (what_to_collect == t_contiguous) mark_contblock((char *)x->ht.ht_self,j*sizeof(struct htent)); diff --git a/gcl/o/sgbc.c b/gcl/o/sgbc.c index 9e0f53a53..9c265ba4d 100755 --- a/gcl/o/sgbc.c +++ b/gcl/o/sgbc.c @@ -227,7 +227,7 @@ sgc_mark_object1(object x) { if (x->ht.ht_self == NULL) break; for (i = 0, j = x->ht.ht_size; i < j; i++) { - if (ON_WRITABLE_PAGE(&x->ht.ht_self[i])) { + if (x->ht.ht_self[i].hte_key!=OBJNULL && ON_WRITABLE_PAGE(&x->ht.ht_self[i])) { sgc_mark_object(x->ht.ht_self[i].hte_key); sgc_mark_object(x->ht.ht_self[i].hte_value); } |