aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-21 21:53:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-21 21:53:48 +0000
commita633ed2812d4eb6e7568f6b545b4bbac6d2ff2b7 (patch)
treee51ef6141b0a6cc753e08df8f7d330e044ee4806 /gc.c
parenta72bf51b07e533a93def9b9f71c2c59319ec9116 (diff)
downloadruby-a633ed2812d4eb6e7568f6b545b4bbac6d2ff2b7.tar.gz
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index f8172131ac..f8bd46e255 100644
--- a/gc.c
+++ b/gc.c
@@ -6092,7 +6092,7 @@ objspace_malloc_increase(rb_objspace_t *objspace, void *mem, size_t new_size, si
#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);
}