summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--gc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d8f4cfe7a..fc0045f9a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 12 12:27:55 2008 Tanaka Akira <akr@fsij.org>
+
+ * gc.c (assign_heap_slot): fix condition for number of objects in
+ a heap.
+
Mon May 12 12:24:48 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (sym_to_i): really removed. [ruby-dev:34641]
diff --git a/gc.c b/gc.c
index 259b5cd673..655b1cd557 100644
--- a/gc.c
+++ b/gc.c
@@ -551,7 +551,7 @@ assign_heap_slot(rb_objspace_t *objspace)
membase = p;
if ((VALUE)p % sizeof(RVALUE) != 0) {
p = (RVALUE*)((VALUE)p + sizeof(RVALUE) - ((VALUE)p % sizeof(RVALUE)));
- if ((membase + HEAP_SIZE) < (p + HEAP_SIZE)) {
+ if ((HEAP_SIZE - HEAP_OBJ_LIMIT * sizeof(RVALUE)) < ((char*)p - (char*)membase)) {
objs--;
}
}