* 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
This commit is contained in:
nobu 2014-04-21 21:53:48 +00:00
Родитель a72bf51b07
Коммит a633ed2812
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Tue Apr 22 06:53:30 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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@ruby-lang.org>
* string.c (rb_str_coderange_scan_restartable): coderange is always

2
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);
}