summaryrefslogtreecommitdiff
path: root/allchblk.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-12-08 17:25:04 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:52 +0200
commit61d0de0517da47be2718db10e7987f6ab4936bd6 (patch)
treebd35f7a49d99deb9dd19aee0bc09da7af3131f84 /allchblk.c
parent197742f24da7b83431132559f8e306d5da5df8f0 (diff)
2009-12-08 Ivan Maidanski <ivmai@mail.ru>
* allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection() if GC_DISABLE_INCREMENTAL. * reclaim.c (GC_reclaim_generic): Ditto. * checksums.c (GC_page_was_ever_dirty): Add prototype. * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare unless PARALLEL_MARK. * include/private/gc_priv.h (GC_dirty_maintained, GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't declare if GC_DISABLE_INCREMENTAL. * include/private/gc_priv.h (GC_print_finalization_stats): Don't declare if SMALL_CONFIG. * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if GC_DISABLE_INCREMENTAL (since nothing to check). * include/private/gcconfig.h (DEFAULT_VDB): Don't define if GC_DISABLE_INCREMENTAL. * os_dep.c (GC_dirty_maintained): Ditto. * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if GC_DISABLE_INCREMENTAL. * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty): Uncomment; define only if CHECKSUMS.
Diffstat (limited to 'allchblk.c')
-rw-r--r--allchblk.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/allchblk.c b/allchblk.c
index d6a1437..6f78d4a 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -794,15 +794,16 @@ GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n,
GC_remove_counts(hbp, (word)size_needed);
return(0); /* ditto */
}
-
- /* 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. */
+# ifndef GC_DISABLE_INCREMENTAL
+ /* 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 */);
-
+# endif
/* We just successfully allocated a block. Restart count of */
/* consecutive failures. */
GC_fail_count = 0;