ruby-changes:27848
From: nari <ko1@a...>
Date: Sun, 24 Mar 2013 13:20:44 +0900 (JST)
Subject: [ruby-changes:27848] nari:r39900 (trunk): * gc.c: We have no chance to expand the heap when lazy sweeping is
nari 2013-03-24 13:20:32 +0900 (Sun, 24 Mar 2013) New Revision: 39900 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39900 Log: * gc.c: We have no chance to expand the heap when lazy sweeping is restricted. So collecting is often invoked if there is not enough free space in the heap. Try to expand heap when this is the case. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 39899) +++ ChangeLog (revision 39900) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Mar 24 12:55:47 2013 Narihiro Nakamura <authornari@g...> + + * gc.c: We have no chance to expand the heap when lazy sweeping is + restricted. So collecting is often invoked if there is not + enough free space in the heap. Try to expand heap when this is + the case. + Sun Mar 24 11:03:31 2013 Tanaka Akira <akr@f...> * test/ruby/test_require.rb: Remove temporally files in the tests. Index: gc.c =================================================================== --- gc.c (revision 39899) +++ gc.c (revision 39900) @@ -2043,8 +2043,14 @@ gc_prepare_free_objects(rb_objspace_t *o https://github.com/ruby/ruby/blob/trunk/gc.c#L2043 { int res; - if (objspace->flags.dont_lazy_sweep) - return garbage_collect(objspace); + if (objspace->flags.dont_lazy_sweep) { + if (heaps_increment(objspace)) { + return; + } + else { + return garbage_collect(objspace); + } + } if (!ready_to_gc(objspace)) return TRUE; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/