ruby-changes:27758
From: nari <ko1@a...>
Date: Mon, 18 Mar 2013 18:03:19 +0900 (JST)
Subject: [ruby-changes:27758] nari:r39810 (trunk): * gc.c: Fix unlimited memory growth with large values of
nari 2013-03-18 18:03:07 +0900 (Mon, 18 Mar 2013) New Revision: 39810 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39810 Log: * gc.c: Fix unlimited memory growth with large values of RUBY_FREE_MIN. patched by tmm1(Aman Gupta). [Bug #8095] [ruby-core:53405] Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 39809) +++ ChangeLog (revision 39810) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Mar 18 17:58:36 2013 Narihiro Nakamura <authornari@g...> + + * 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@r...> * test/win32ole/test_err_in_callback.rb Index: gc.c =================================================================== --- gc.c (revision 39809) +++ gc.c (revision 39810) @@ -1973,8 +1973,9 @@ before_gc_sweep(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L1973 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/