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

ruby-changes:27849

From: nari <ko1@a...>
Date: Sun, 24 Mar 2013 13:53:54 +0900 (JST)
Subject: [ruby-changes:27849] nari:r39901 (trunk): * gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping

nari	2013-03-24 13:53:44 +0900 (Sun, 24 Mar 2013)

  New Revision: 39901

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

  Log:
    * gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping
      for debugging. [Feature #8024] [ruby-dev:47135]

  Modified files:
    trunk/ChangeLog
    trunk/gc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39900)
+++ ChangeLog	(revision 39901)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Mar 24 13:42:24 2013  Narihiro Nakamura  <authornari@g...>
+
+	* gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping
+	  for debugging. [Feature #8024] [ruby-dev:47135]
+
 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
Index: gc.c
===================================================================
--- gc.c	(revision 39900)
+++ gc.c	(revision 39901)
@@ -98,6 +98,9 @@ static ruby_gc_params_t initial_params = https://github.com/ruby/ruby/blob/trunk/gc.c#L98
 #ifndef GC_PROFILE_MORE_DETAIL
 #define GC_PROFILE_MORE_DETAIL 0
 #endif
+#ifndef GC_ENABLE_LAZY_SWEEP
+#define GC_ENABLE_LAZY_SWEEP 1
+#endif
 
 typedef struct gc_profile_record {
     double gc_time;
@@ -2043,7 +2046,7 @@ gc_prepare_free_objects(rb_objspace_t *o https://github.com/ruby/ruby/blob/trunk/gc.c#L2046
 {
     int res;
 
-    if (objspace->flags.dont_lazy_sweep) {
+    if (!GC_ENABLE_LAZY_SWEEP || objspace->flags.dont_lazy_sweep) {
 	if (heaps_increment(objspace)) {
 	    return;
 	}

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

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