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

ruby-changes:31959

From: ko1 <ko1@a...>
Date: Fri, 6 Dec 2013 18:38:28 +0900 (JST)
Subject: [ruby-changes:31959] ko1:r44038 (trunk): * gc.c (rb_objspace_alloc, Init_heap): initialize

ko1	2013-12-06 18:38:22 +0900 (Fri, 06 Dec 2013)

  New Revision: 44038

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

  Log:
    * gc.c (rb_objspace_alloc, Init_heap): initialize
      oldmalloc_increase_limit at Init_heap.
      rb_objspace_alloc() is not called on some platforms.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44037)
+++ ChangeLog	(revision 44038)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec  6 18:37:11 2013  Koichi Sasada  <ko1@a...>
+
+	* gc.c (rb_objspace_alloc, Init_heap): initialize
+	  oldmalloc_increase_limit at Init_heap.
+
+	  rb_objspace_alloc() is not called on some platforms.
+
 Fri Dec  6 18:33:39 2013  Koichi Sasada  <ko1@a...>
 
 	* gc.c (garbage_collect_body): bug fix.
Index: gc.c
===================================================================
--- gc.c	(revision 44037)
+++ gc.c	(revision 44038)
@@ -867,9 +867,6 @@ rb_objspace_alloc(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L867
     ruby_gc_stress = ruby_initial_gc_stress;
 
     malloc_limit = gc_params.malloc_limit_min;
-#if RGENGC_ESTIMATE_OLDMALLOC
-    objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
-#endif
 
     return objspace;
 }
@@ -1649,6 +1646,10 @@ Init_heap(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L1646
 {
     rb_objspace_t *objspace = &rb_objspace;
 
+#if RGENGC_ESTIMATE_OLDMALLOC
+    objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
+#endif
+
     heap_add_pages(objspace, heap_eden, gc_params.heap_init_slots / HEAP_OBJ_LIMIT);
 
     init_mark_stack(&objspace->mark_stack);

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

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