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

ruby-changes:57295

From: usa <ko1@a...>
Date: Tue, 27 Aug 2019 12:09:11 +0900 (JST)
Subject: [ruby-changes:57295] usa: 00a7d49b42 (ruby_2_5): merge revision(s) f1a52d96a59c63d46cb23af60cdcaf38e30e0512 [Backport #15784]

https://git.ruby-lang.org/ruby.git/commit/?id=00a7d49b42

From 00a7d49b422b5cca81120e370c97c4ce0d864fe8 Mon Sep 17 00:00:00 2001
From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Tue, 27 Aug 2019 03:08:53 +0000
Subject: merge revision(s) f1a52d96a59c63d46cb23af60cdcaf38e30e0512 [Backport
 #15784] Defer setting gc_stress until inits done

[Bug #15784]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

diff --git a/gc.c b/gc.c
index 21554ee..7c972f5 100644
--- a/gc.c
+++ b/gc.c
@@ -2388,6 +2388,10 @@ Init_heap(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L2388
 
     gc_stress_set(objspace, ruby_initial_gc_stress);
 
+    dont_gc = 1;
+
+    gc_stress_set(objspace, ruby_initial_gc_stress);
+
 #if RGENGC_ESTIMATE_OLDMALLOC
     objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
 #endif
@@ -2409,6 +2413,14 @@ Init_heap(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L2413
     finalizer_table = st_init_numtable();
 }
 
+void
+Init_gc_stress(void)
+{
+    rb_objspace_t *objspace = &rb_objspace;
+
+    dont_gc = 0;
+}
+
 typedef int each_obj_callback(void *, void *, size_t, void *);
 
 struct each_obj_args {
diff --git a/inits.c b/inits.c
index 5822f04..d6cc0cb 100644
--- a/inits.c
+++ b/inits.c
@@ -61,5 +61,6 @@ rb_call_inits(void) https://github.com/ruby/ruby/blob/trunk/inits.c#L61
     CALL(Complex);
     CALL(version);
     CALL(vm_trace);
+    CALL(gc_stress);
 }
 #undef CALL
diff --git a/version.h b/version.h
index 1cb2cd8..0abdcb4 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1
 #define RUBY_VERSION "2.5.6"
 #define RUBY_RELEASE_DATE "2019-08-27"
-#define RUBY_PATCHLEVEL 193
+#define RUBY_PATCHLEVEL 194
 
 #define RUBY_RELEASE_YEAR 2019
 #define RUBY_RELEASE_MONTH 8
-- 
cgit v0.10.2


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

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