diff options
author | Petter A. Urkedal <paurkedal@gmail.com> | 2018-10-30 21:00:32 +0100 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-11-02 10:23:40 +0300 |
commit | 3a5da5e6c7d336c616bf7e42fb4c56b24fc139ec (patch) | |
tree | b45455381eb2f4a5bdcbe38e62695634468ef9bb /reclaim.c | |
parent | 95e0747277afa231cad42b9ce73c1385ba3a7f87 (diff) | |
download | bdwgc-3a5da5e6c7d336c616bf7e42fb4c56b24fc139ec.tar.gz |
Fix marks and hb_n_marks consistency when disclaim returns true
* reclaim.c [ENABLE_DISCLAIM] (GC_disclaim_and_reclaim): When a
disclaim callback returns 1 to protect an object from being reclaimed,
mark it to skip it on repeated scans within the cycle. In particular,
this fixes sz*hhdr->hb_n_marks<=HBLKSIZE assertion failure due to
excessive increments of hb_n_marks.
Diffstat (limited to 'reclaim.c')
-rw-r--r-- | reclaim.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -238,6 +238,7 @@ STATIC ptr_t GC_reclaim_uninit(struct hblk *hbp, hdr *hhdr, word sz, while ((word)p <= (word)plim) { int marked = mark_bit_from_hdr(hhdr, bit_no); if (!marked && (*disclaim)(p)) { + set_mark_bit_from_hdr(hhdr, bit_no); hhdr -> hb_n_marks++; marked = 1; } |