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

ruby-changes:36521

From: ko1 <ko1@a...>
Date: Thu, 27 Nov 2014 13:20:28 +0900 (JST)
Subject: [ruby-changes:36521] ko1:r48603 (trunk): * gc.c (objspace_malloc_increase): enable lazy sweep on GC by malloc()

ko1	2014-11-27 13:20:14 +0900 (Thu, 27 Nov 2014)

  New Revision: 48603

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

  Log:
    * gc.c (objspace_malloc_increase): enable lazy sweep on GC by malloc()
      (malloc_increase) to make GC incrementally.
      This change can increase memory consumption. Report us if you find
      any problem.

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48602)
+++ ChangeLog	(revision 48603)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Nov 27 13:11:00 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (objspace_malloc_increase): enable lazy sweep on GC by malloc()
+	  (malloc_increase) to make GC incrementally.
+
+	  This change can increase memory consumption. Report us if you find
+	  any problem.
+
 Thu Nov 27 12:46:38 2014  Tanaka Akira  <akr@f...>
 
 	* time.c (time_s_mkutc): [DOC] Time.utc's 10 arguments form
Index: gc.c
===================================================================
--- gc.c	(revision 48602)
+++ gc.c	(revision 48603)
@@ -7218,7 +7218,7 @@ objspace_malloc_increase(rb_objspace_t * https://github.com/ruby/ruby/blob/trunk/gc.c#L7218
 		gc_rest(objspace); /* gc_rest can reduce malloc_increase */
 		goto retry;
 	    }
-	    garbage_collect_with_gvl(objspace, FALSE, TRUE, TRUE, GPR_FLAG_MALLOC);
+	    garbage_collect_with_gvl(objspace, FALSE, FALSE, FALSE, GPR_FLAG_MALLOC);
 	}
     }
 
Index: NEWS
===================================================================
--- NEWS	(revision 48602)
+++ NEWS	(revision 48603)
@@ -334,6 +334,7 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L334
     * Most symbols which are returned by String#to_sym and
       String#intern are GC-able [Feature #9634]
     * Introduce incremental marking for major GC. [Feature #10137]
+    * Enable lazy sweep on GC caused by malloc().
 
 * VM
     * Use frozen string literals for Hash#[] and Hash#[]=

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

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