summaryrefslogtreecommitdiff
path: root/allchblk.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2009-06-20 22:24:43 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:45 +0200
commit68ed7473eb69ad894551afe2a78f0cc99af6f82e (patch)
tree52c5bb5d398d21fbac6f9834c1115e730b94747e /allchblk.c
parentf4db11bf68b5fa1736f02f6e9b2b1e067fc386f7 (diff)
2009-06-20 Hans Boehm <Hans.Boehm@hp.com>
* allchblk.c (GC_allochblk_nth): Add assertion. * checksums.c: Add GC_record_fault, GC_was_faulted, CC_n_faulted_dirty_errors. (GC_check_dirty): Remove register declarations, print dirty bit errors on faulted pages. * os_dep.c (GC_write_fault_handler): Call GC_record_fault(). * os_dep.c (GC_remove_protection): Compute index correctly.
Diffstat (limited to 'allchblk.c')
-rw-r--r--allchblk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/allchblk.c b/allchblk.c
index 946f971..b723a7f 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -787,6 +787,9 @@ GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n, GC_bool may_split)
/* Notify virtual dirty bit implementation that we are about to write. */
/* Ensure that pointerfree objects are not protected if it's avoidable. */
+ /* This also ensures that newly allocated blocks are treated as dirty. */
+ /* Necessary since we don't protect free blocks. */
+ GC_ASSERT((size_needed & (HBLKSIZE-1)) == 0);
GC_remove_protection(hbp, divHBLKSZ(size_needed),
(hhdr -> hb_descr == 0) /* pointer-free */);