summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog6
-rw-r--r--gc.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 152a3335cb..f878956556 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Feb 15 10:59:52 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * 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]
+
Wed Feb 15 09:27:45 2012 Eric Hodel <drbrain@segment7.net>
* ext/zlib/zlib.c (Init_zlib): Added Zlib::FIXED and Zlib::RLE
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)