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

ruby-changes:33878

From: ko1 <ko1@a...>
Date: Fri, 16 May 2014 17:38:11 +0900 (JST)
Subject: [ruby-changes:33878] ko1:r45959 (trunk): * gc.c (gc_before_sweep): heap_pages_swept_slots should contains

ko1	2014-05-16 17:38:04 +0900 (Fri, 16 May 2014)

  New Revision: 45959

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

  Log:
    * gc.c (gc_before_sweep): heap_pages_swept_slots should contains
      heap_pages_increment.
      For example, GC by exceeding malloc_limit can remain
      heap_pages_increment.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45958)
+++ ChangeLog	(revision 45959)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri May 16 17:26:24 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_before_sweep): heap_pages_swept_slots should contains
+	  heap_pages_increment.
+
+	  For example, GC by exceeding malloc_limit can remain
+	  heap_pages_increment.
+
 Thu May 15 21:18:43 2014  Hiroshi Shirosaki  <h.shirosaki@g...>
 
 	* configure.in: enable SSE2 on mingw. target='i386-pc-mingw32'.
Index: gc.c
===================================================================
--- gc.c	(revision 45958)
+++ gc.c	(revision 45959)
@@ -2910,7 +2910,8 @@ gc_before_sweep(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L2910
 	rb_sweep_method_entry(GET_VM());
     }
 
-    heap_pages_swept_slots = 0;
+    /* sometimes heap_pages_increment is not 0 */
+    heap_pages_swept_slots = heap_pages_increment * HEAP_OBJ_LIMIT;
     total_limit_slot = objspace_total_slot(objspace);
 
     heap_pages_min_free_slots = (size_t)(total_limit_slot * GC_HEAP_FREE_SLOTS_MIN_RATIO);

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

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