summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-27 04:20:14 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-27 04:20:14 +0000
commit3a26241da3aec3d20dfc408a32de1c539455c89b (patch)
tree7bc3bf3cd94ce85d39bf928d1cae6e3231971cfc
parent15bfc6ffbfe59ce71ad24d9327b34562b1470bd6 (diff)
* gc.c (objspace_malloc_increase): enable lazy sweep on GC by malloc()
(malloc_increase) to make GC incrementally. This change can increase memory consumption. Report us if you find any problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--NEWS1
-rw-r--r--gc.c2
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5235853..cc1a935 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Nov 27 13:11:00 2014 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (objspace_malloc_increase): enable lazy sweep on GC by malloc()
+ (malloc_increase) to make GC incrementally.
+
+ This change can increase memory consumption. Report us if you find
+ any problem.
+
Thu Nov 27 12:46:38 2014 Tanaka Akira <akr@fsij.org>
* time.c (time_s_mkutc): [DOC] Time.utc's 10 arguments form
diff --git a/NEWS b/NEWS
index 3ebec55..a32ea90 100644
--- a/NEWS
+++ b/NEWS
@@ -334,6 +334,7 @@ with all sufficient information, see the ChangeLog file.
* Most symbols which are returned by String#to_sym and
String#intern are GC-able [Feature #9634]
* Introduce incremental marking for major GC. [Feature #10137]
+ * Enable lazy sweep on GC caused by malloc().
* VM
* Use frozen string literals for Hash#[] and Hash#[]=
diff --git a/gc.c b/gc.c
index 8cde90c..92dfb37 100644
--- a/gc.c
+++ b/gc.c
@@ -7218,7 +7218,7 @@ objspace_malloc_increase(rb_objspace_t *objspace, void *mem, size_t new_size, si
gc_rest(objspace); /* gc_rest can reduce malloc_increase */
goto retry;
}
- garbage_collect_with_gvl(objspace, FALSE, TRUE, TRUE, GPR_FLAG_MALLOC);
+ garbage_collect_with_gvl(objspace, FALSE, FALSE, FALSE, GPR_FLAG_MALLOC);
}
}