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

ruby-changes:34249

From: ko1 <ko1@a...>
Date: Tue, 3 Jun 2014 13:19:28 +0900 (JST)
Subject: [ruby-changes:34249] ko1:r46330 (trunk): * gc.c (objspace_live_slot): live slot count should not include final

ko1	2014-06-03 13:19:21 +0900 (Tue, 03 Jun 2014)

  New Revision: 46330

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

  Log:
    * gc.c (objspace_live_slot): live slot count should not include final
      slot (contains T_ZOMBIE) count.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46329)
+++ ChangeLog	(revision 46330)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jun  3 13:18:24 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (objspace_live_slot): live slot count should not include final
+	  slot (contains T_ZOMBIE) count.
+
 Tue Jun  3 13:03:21 2014  Koichi Sasada  <ko1@a...>
 
 	* gc.c (obj_free): fix spacing.
Index: gc.c
===================================================================
--- gc.c	(revision 46329)
+++ gc.c	(revision 46330)
@@ -2743,7 +2743,7 @@ lazy_sweep_enable(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L2743
 static size_t
 objspace_live_slot(rb_objspace_t *objspace)
 {
-    return objspace->profile.total_allocated_object_num - objspace->profile.total_freed_object_num;
+    return objspace->profile.total_allocated_object_num - objspace->profile.total_freed_object_num - heap_pages_final_slots;
 }
 
 static size_t

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

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