merge revision(s) f1a52d96a5 [Backport #15784]

Defer setting gc_stress until inits done

[Bug #15784]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2019-08-27 03:08:53 +00:00
parent 4d9c58752a
commit 00a7d49b42
3 changed files with 14 additions and 1 deletions

12
gc.c
View File

@ -2388,6 +2388,10 @@ Init_heap(void)
gc_stress_set(objspace, ruby_initial_gc_stress);
dont_gc = 1;
gc_stress_set(objspace, ruby_initial_gc_stress);
#if RGENGC_ESTIMATE_OLDMALLOC
objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
#endif
@ -2409,6 +2413,14 @@ Init_heap(void)
finalizer_table = st_init_numtable();
}
void
Init_gc_stress(void)
{
rb_objspace_t *objspace = &rb_objspace;
dont_gc = 0;
}
typedef int each_obj_callback(void *, void *, size_t, void *);
struct each_obj_args {

View File

@ -61,5 +61,6 @@ rb_call_inits(void)
CALL(Complex);
CALL(version);
CALL(vm_trace);
CALL(gc_stress);
}
#undef CALL

View File

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.5.6"
#define RUBY_RELEASE_DATE "2019-08-27"
#define RUBY_PATCHLEVEL 193
#define RUBY_PATCHLEVEL 194
#define RUBY_RELEASE_YEAR 2019
#define RUBY_RELEASE_MONTH 8