1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Defer setting gc_stress instead of setting dont_gc

[Bug #15784]
This commit is contained in:
Nobuyoshi Nakada 2019-04-24 17:34:21 +09:00
parent f1a52d96a5
commit 1613917ae6
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

6
gc.c
View file

@ -2571,10 +2571,6 @@ Init_heap(void)
objspace->id_to_obj_tbl = st_init_numtable();
objspace->obj_to_id_tbl = st_init_numtable();
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
@ -2591,7 +2587,7 @@ Init_gc_stress(void)
{
rb_objspace_t *objspace = &rb_objspace;
dont_gc = 0;
gc_stress_set(objspace, ruby_initial_gc_stress);
}
typedef int each_obj_callback(void *, void *, size_t, void *);