aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 16:35:54 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 16:35:54 +0000
commit9782d219f34aded1d0b80f7bdff809132550561e (patch)
tree63d87b058d7e68a7a1e29c0811e11b6072e51b1c
parentb3abb163f4e0e5cc52aa5b4dfacff4273c0510c9 (diff)
downloadruby-9782d219f34aded1d0b80f7bdff809132550561e.tar.gz
* gc.c (vm_malloc_increase): sweep immediately on GC due to malloc().
To reduce memory usage, sweep as soon as possible. This behavior is same as Ruby 2.0.0 and before. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--gc.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 63fd388fb2..9ba9221a08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Nov 10 01:34:14 2013 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (vm_malloc_increase): sweep immediately on GC due to malloc().
+ To reduce memory usage, sweep as soon as possible.
+ This behavior is same as Ruby 2.0.0 and before.
+
Sun Nov 10 00:39:26 2013 Koichi Sasada <ko1@atdot.net>
* benchmark/gc/gcbench.rb: output version description and GC::OPTS.
diff --git a/gc.c b/gc.c
index dda3292b60..4b0fb1c0a3 100644
--- a/gc.c
+++ b/gc.c
@@ -5449,7 +5449,7 @@ vm_malloc_increase(rb_objspace_t *objspace, size_t new_size, size_t old_size, in
if (do_gc) {
if (ruby_gc_stress && !ruby_disable_gc_stress) {
- garbage_collect_with_gvl(objspace, 0, 0, GPR_FLAG_MALLOC);
+ garbage_collect_with_gvl(objspace, FALSE, TRUE, GPR_FLAG_MALLOC);
}
else {
retry:
@@ -5458,7 +5458,7 @@ vm_malloc_increase(rb_objspace_t *objspace, size_t new_size, size_t old_size, in
gc_rest_sweep(objspace); /* rest_sweep can reduce malloc_increase */
goto retry;
}
- garbage_collect_with_gvl(objspace, 0, 0, GPR_FLAG_MALLOC);
+ garbage_collect_with_gvl(objspace, FALSE, TRUE, GPR_FLAG_MALLOC);
}
}
}