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

ruby-changes:32777

From: naruse <ko1@a...>
Date: Thu, 6 Feb 2014 11:24:45 +0900 (JST)
Subject: [ruby-changes:32777] naruse:r44856 (ruby_2_1): merge revision(s) 44853: [Backport #9490]

naruse	2014-02-06 11:24:40 +0900 (Thu, 06 Feb 2014)

  New Revision: 44856

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

  Log:
    merge revision(s) 44853: [Backport #9490]
    
    * gc.c (ruby_gc_set_params): if RUBY_GC_OLDMALLOC_LIMIT is provided,
      then set objspace->rgengc.oldmalloc_increase_limit.
      Without this fix, the env variable RUBY_GC_OLDMALLOC_LIMIT
      does not work.
    
    * gc.c (get_envparam_int): accept a value equals to lowerbounds.
    
    * gc.c (get_envparam_double): ditto.

  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 44855)
+++ ruby_2_1/ChangeLog	(revision 44856)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Thu Feb  6 11:23:59 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (ruby_gc_set_params): if RUBY_GC_OLDMALLOC_LIMIT is provided,
+	  then set objspace->rgengc.oldmalloc_increase_limit.
+	  Without this fix, the env variable RUBY_GC_OLDMALLOC_LIMIT
+	  does not work.
+
+	* gc.c (get_envparam_int): accept a value equals to lowerbounds.
+
+	* gc.c (get_envparam_double): ditto.
+
 Wed Feb  5 23:57:05 2014  Charlie Somerville  <charliesome@r...>
 
 	* ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
Index: ruby_2_1/gc.c
===================================================================
--- ruby_2_1/gc.c	(revision 44855)
+++ ruby_2_1/gc.c	(revision 44856)
@@ -2916,7 +2916,9 @@ gc_before_sweep(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L2916
 	    }
 	}
 
-	if (0) fprintf(stderr, "%d\t%d\t%u\t%u\t%d\n", (int)rb_gc_count(), objspace->rgengc.need_major_gc,
+	if (0) fprintf(stderr, "%d\t%d\t%u\t%u\t%d\n",
+		       (int)rb_gc_count(),
+		       (int)objspace->rgengc.need_major_gc,
 		       (unsigned int)objspace->rgengc.oldmalloc_increase,
 		       (unsigned int)objspace->rgengc.oldmalloc_increase_limit,
 		       (unsigned int)gc_params.oldmalloc_limit_max);
@@ -5647,7 +5649,7 @@ get_envparam_int(const char *name, unsig https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L5649
 
     if (ptr != NULL) {
 	val = atoi(ptr);
-	if (val > lower_bound) {
+	if (val >= lower_bound) {
 	    if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (%d)\n", name, val, *default_value);
 	    *default_value = val;
 	    return 1;
@@ -5667,7 +5669,7 @@ get_envparam_double(const char *name, do https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L5669
 
     if (ptr != NULL) {
 	val = strtod(ptr, NULL);
-	if (val > lower_bound) {
+	if (val >= lower_bound) {
 	    if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (%f)\n", name, val, *default_value);
 	    *default_value = val;
 	    return 1;
@@ -5746,7 +5748,10 @@ ruby_gc_set_params(int safe_level) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L5748
     get_envparam_double("RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR", &gc_params.malloc_limit_growth_factor, 1.0);
 
 #ifdef RGENGC_ESTIMATE_OLDMALLOC
-    get_envparam_int("RUBY_GC_OLDMALLOC_LIMIT", &gc_params.oldmalloc_limit_min, 0);
+    if (get_envparam_int("RUBY_GC_OLDMALLOC_LIMIT", &gc_params.oldmalloc_limit_min, 0)) {
+	rb_objspace_t *objspace = &rb_objspace;
+	objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
+    }
     get_envparam_int("RUBY_GC_OLDMALLOC_LIMIT_MAX", &gc_params.oldmalloc_limit_max, 0);
     get_envparam_double("RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR", &gc_params.oldmalloc_limit_growth_factor, 1.0);
 #endif
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 44855)
+++ ruby_2_1/version.h	(revision 44856)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.1"
 #define RUBY_RELEASE_DATE "2014-02-06"
-#define RUBY_PATCHLEVEL 24
+#define RUBY_PATCHLEVEL 25
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 2

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


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

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