diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-16 08:38:04 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-16 08:38:04 +0000 |
commit | be5ed87c2f2f8d17665fde4c939ac1605d402ac4 (patch) | |
tree | 8164d0ed837221e86ff14291bbc1bad494a2f10d /gc.c | |
parent | ee88a8deb23bece3efc1efc3d78bc693c6f450bf (diff) | |
download | ruby-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
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |