summaryrefslogtreecommitdiff
path: root/reclaim.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2006-07-12 02:45:44 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:38 +0200
commitc9be250270d6685b28d540da27a95a35331a05b8 (patch)
tree6f939762aa4585235107e68e524bf56d77092e55 /reclaim.c
parent7294560392d4968034d5e7855c9103667c5aef18 (diff)
2006-07-11 Hans Boehm <Hans.Boehm@hp.com>
* include/private/gc_priv.h (hb_n_marks): Correct description comment. * reclaim.c: Fix hb_n_marks assertion.
Diffstat (limited to 'reclaim.c')
-rw-r--r--reclaim.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/reclaim.c b/reclaim.c
index 1149f49..0ef7213 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -290,8 +290,13 @@ void GC_reclaim_block(struct hblk *hbp, word report_if_found)
} else {
GC_bool empty = GC_block_empty(hhdr);
# ifdef PARALLEL_MARK
- /* Count can be low or one too high. */
- GC_ASSERT(hhdr -> hb_n_marks <= HBLKSIZE/sz + 1);
+ /* Count can be low or one too high because we sometimes */
+ /* have to ignore decrements. Objects can also potentially */
+ /* be repeatedly marked by each marker. */
+ /* Here we assume two markers, but this is extremely */
+ /* unlikely to fail spuriously with more. And if it does, it */
+ /* should be looked at. */
+ GC_ASSERT(hhdr -> hb_n_marks <= 2 * (HBLKSIZE/sz + 1) + 16);
# else
GC_ASSERT(sz * hhdr -> hb_n_marks <= HBLKSIZE);
# endif