diff options
author | nari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-18 09:03:07 +0000 |
---|---|---|
committer | nari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-18 09:03:07 +0000 |
commit | 03c7f0ca43a65b18d81387f82bf91e5d5bc14bee (patch) | |
tree | 80e8d681f33c010d2df79b2962326e8799edfda5 | |
parent | ac454412abff3e4ba084c987802f61dcc4914dae (diff) | |
download | ruby-03c7f0ca43a65b18d81387f82bf91e5d5bc14bee.tar.gz |
* gc.c: Fix unlimited memory growth with large values of
RUBY_FREE_MIN. patched by tmm1(Aman Gupta).
[Bug #8095] [ruby-core:53405]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Mon Mar 18 17:58:36 2013 Narihiro Nakamura <authornari@gmail.com> + + * gc.c: Fix unlimited memory growth with large values of + RUBY_FREE_MIN. patched by tmm1(Aman Gupta). + [Bug #8095] [ruby-core:53405] + Mon Mar 18 14:46:19 2013 NAKAMURA Usaku <usa@ruby-lang.org> * test/win32ole/test_err_in_callback.rb @@ -1973,8 +1973,9 @@ before_gc_sweep(rb_objspace_t *objspace) objspace->heap.do_heap_free = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.65); objspace->heap.free_min = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.2); if (objspace->heap.free_min < initial_free_min) { - objspace->heap.do_heap_free = heaps_used * HEAP_OBJ_LIMIT; objspace->heap.free_min = initial_free_min; + if (objspace->heap.do_heap_free < initial_free_min) + objspace->heap.do_heap_free = initial_free_min; } objspace->heap.sweep_slots = heaps; objspace->heap.free_num = 0; |