summaryrefslogtreecommitdiff
path: root/allchblk.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-08-19 17:43:11 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-08-19 17:43:11 +0300
commita7ac13760ea4e89570c2e64147d959ae68c839f5 (patch)
tree076ddf86ea87739721bde680a623097bcdb7610c /allchblk.c
parent6bc9b255e0476f1cdddd503333991f5cf7e61de2 (diff)
downloadbdwgc-a7ac13760ea4e89570c2e64147d959ae68c839f5.tar.gz
Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
(code refactoring) * allchblk.c (setup_header): Use "ifdef MARK_BIT_PER_GRANULE" instead of "ifndef MARK_BIT_PER_OBJ". * mallocx.c (GC_realloc): Likewise.
Diffstat (limited to 'allchblk.c')
-rw-r--r--allchblk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/allchblk.c b/allchblk.c
index 8b84aab8..fc83b13e 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -250,7 +250,7 @@ static GC_bool setup_header(hdr * hhdr, struct hblk *block, size_t byte_sz,
# ifdef MARK_BIT_PER_OBJ
/* Set hb_inv_sz as portably as possible. */
- /* We set it to the smallest value such that sz * inv_sz > 2**32 */
+ /* We set it to the smallest value such that sz * inv_sz > 2**32 */
/* This may be more precision than necessary. */
if (byte_sz > MAXOBJBYTES) {
hhdr -> hb_inv_sz = LARGE_INV_SZ;
@@ -268,7 +268,8 @@ static GC_bool setup_header(hdr * hhdr, struct hblk *block, size_t byte_sz,
# endif
hhdr -> hb_inv_sz = inv_sz;
}
-# else /* MARK_BIT_PER_GRANULE */
+# endif
+# ifdef MARK_BIT_PER_GRANULE
{
size_t granules = BYTES_TO_GRANULES(byte_sz);