summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-15 02:09:44 +0000
committernari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-15 02:09:44 +0000
commit8b4b4032f711766c3863c40fff33acde9a5bc331 (patch)
treef5acd7247930f80dee9ba6a4a46223696f33bb33 /gc.c
parent623169a5c6cbad1ae6d8969f273f534cbd0c3fe4 (diff)
* gc.c (HEAP_BITMAP_LIMIT): HEAP_BITMAP_LIMIT is computed on the
basis of HEAP_SIZE because it must covers a whole heap block. [ruby-trunk - Bug #6006] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index cbc95ddb26..7e86fb1141 100644
--- a/gc.c
+++ b/gc.c
@@ -547,7 +547,7 @@ rb_objspace_free(rb_objspace_t *objspace)
#define CEILDIV(i, mod) (((i) + (mod) - 1)/(mod))
#define HEAP_OBJ_LIMIT (unsigned int)((HEAP_SIZE - sizeof(struct heaps_header))/sizeof(struct RVALUE))
-#define HEAP_BITMAP_LIMIT CEILDIV(HEAP_OBJ_LIMIT, sizeof(uintptr_t)*8)
+#define HEAP_BITMAP_LIMIT CEILDIV(CEILDIV(HEAP_SIZE, sizeof(struct RVALUE)), sizeof(uintptr_t)*8)
#define GET_HEAP_HEADER(x) (HEAP_HEADER(((uintptr_t)x) & ~(HEAP_ALIGN_MASK)))
#define GET_HEAP_SLOT(x) (GET_HEAP_HEADER(x)->base)