[前][次][番号順一覧][スレッド一覧]

ruby-changes:33736

From: nagachika <ko1@a...>
Date: Mon, 5 May 2014 01:17:14 +0900 (JST)
Subject: [ruby-changes:33736] nagachika:r45817 (ruby_2_1): merge revision(s) r45468: [Backport #9687]

nagachika	2014-05-05 01:17:08 +0900 (Mon, 05 May 2014)

  New Revision: 45817

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45817

  Log:
    merge revision(s) r45468: [Backport #9687]
    
    * gc.c (gc_before_sweep): cap `malloc_limit' to
      gc_params.malloc_limit_max.  It can grow and grow with such case:
        `loop{"a" * (1024 ** 2)}'
      [Bug #9687]
      This issue is pointed by Tim Robertson.
      http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/gc.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 45816)
+++ ruby_2_1/ChangeLog	(revision 45817)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Mon May  5 01:13:00 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_before_sweep): cap `malloc_limit' to
+	  gc_params.malloc_limit_max.  It can grow and grow with such case:
+	    `loop{"a" * (1024 ** 2)}'
+	  [Bug #9687]
+
+	  This issue is pointed by Tim Robertson.
+	  http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/
+
 Mon May  5 00:52:18 2014  Kenta Murata  <mrkn@m...>
 
 	* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.
Index: ruby_2_1/gc.c
===================================================================
--- ruby_2_1/gc.c	(revision 45816)
+++ ruby_2_1/gc.c	(revision 45817)
@@ -2886,7 +2886,7 @@ gc_before_sweep(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L2886
 	    malloc_limit = (size_t)(inc * gc_params.malloc_limit_growth_factor);
 	    if (gc_params.malloc_limit_max > 0 && /* ignore max-check if 0 */
 		malloc_limit > gc_params.malloc_limit_max) {
-		malloc_limit = inc;
+		malloc_limit = gc_params.malloc_limit_max;
 	    }
 	}
 	else {
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 45816)
+++ ruby_2_1/version.h	(revision 45817)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.2"
 #define RUBY_RELEASE_DATE "2014-05-05"
-#define RUBY_PATCHLEVEL 87
+#define RUBY_PATCHLEVEL 88
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 5

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r45468


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]