aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-16 08:38:04 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-16 08:38:04 +0000
commitbe5ed87c2f2f8d17665fde4c939ac1605d402ac4 (patch)
tree8164d0ed837221e86ff14291bbc1bad494a2f10d
parentee88a8deb23bece3efc1efc3d78bc693c6f450bf (diff)
downloadruby-be5ed87c2f2f8d17665fde4c939ac1605d402ac4.tar.gz
* gc.c (gc_before_sweep): heap_pages_swept_slots should contains
heap_pages_increment. For example, GC by exceeding malloc_limit can remain heap_pages_increment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--gc.c3
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 18a1201ad5..d4bb45be4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri May 16 17:26:24 2014 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (gc_before_sweep): heap_pages_swept_slots should contains
+ heap_pages_increment.
+
+ For example, GC by exceeding malloc_limit can remain
+ heap_pages_increment.
+
Thu May 15 21:18:43 2014 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* configure.in: enable SSE2 on mingw. target='i386-pc-mingw32'.
diff --git a/gc.c b/gc.c
index f64909006c..fd0a90d724 100644
--- a/gc.c
+++ b/gc.c
@@ -2910,7 +2910,8 @@ gc_before_sweep(rb_objspace_t *objspace)
rb_sweep_method_entry(GET_VM());
}
- heap_pages_swept_slots = 0;
+ /* sometimes heap_pages_increment is not 0 */
+ heap_pages_swept_slots = heap_pages_increment * HEAP_OBJ_LIMIT;
total_limit_slot = objspace_total_slot(objspace);
heap_pages_min_free_slots = (size_t)(total_limit_slot * GC_HEAP_FREE_SLOTS_MIN_RATIO);