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

ruby-changes:33572

From: nobu <ko1@a...>
Date: Tue, 22 Apr 2014 06:53:57 +0900 (JST)
Subject: [ruby-changes:33572] nobu:r45653 (trunk): gc.c: GC.stress after realloc

nobu	2014-04-22 06:53:48 +0900 (Tue, 22 Apr 2014)

  New Revision: 45653

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

  Log:
    gc.c: GC.stress after realloc
    
    * gc.c (objspace_malloc_increase): run GC after realloc not only
      malloc and calloc by GC.stress.  [ruby-core:62103] [Feature #9761]

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45652)
+++ ChangeLog	(revision 45653)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Apr 22 06:53:30 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* gc.c (objspace_malloc_increase): run GC after realloc not only
+	  malloc and calloc by GC.stress.  [ruby-core:62103] [Feature #9761]
+
 Mon Apr 21 19:12:20 2014  NARUSE, Yui  <naruse@r...>
 
 	* string.c (rb_str_coderange_scan_restartable): coderange is always
Index: gc.c
===================================================================
--- gc.c	(revision 45652)
+++ gc.c	(revision 45653)
@@ -6092,7 +6092,7 @@ objspace_malloc_increase(rb_objspace_t * https://github.com/ruby/ruby/blob/trunk/gc.c#L6092
 #endif
     }
 
-    if (type == MEMOP_TYPE_MALLOC) {
+    if (type == MEMOP_TYPE_MALLOC || type == MEMOP_TYPE_REALLOC) {
 	if (ruby_gc_stress && !ruby_disable_gc_stress && ruby_native_thread_p()) {
 	    garbage_collect_with_gvl(objspace, FALSE, TRUE, GPR_FLAG_MALLOC);
 	}

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

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