Project

General

Profile

Feature #18494 » 0003-ruby_gc_set_params-do-not-set-initial-pages-on-dynam.patch

normalperson (Eric Wong), 01/17/2022 11:15 PM

View differences:

gc.c
*/
void
ruby_gc_set_params(void)
ruby_gc_set_params(bool initial)
{
rb_objspace_t *objspace = &rb_objspace;
/* RUBY_GC_HEAP_FREE_SLOTS */
......
/* RUBY_GC_HEAP_INIT_SLOTS */
if (get_envparam_size("RUBY_GC_HEAP_INIT_SLOTS", &gc_params.heap_init_slots, 0)) {
gc_set_initial_pages();
if (initial)
gc_set_initial_pages();
}
get_envparam_double("RUBY_GC_HEAP_GROWTH_FACTOR", &gc_params.growth_factor, 1.0, 0.0, FALSE);
hash.c
ruby_reset_timezone();
} else if (ENVNMATCH(nam, gc_var_pfx, sizeof(gc_var_pfx) - 1)) {
ENV_LOCK();
ruby_gc_set_params();
ruby_gc_set_params(false);
ENV_UNLOCK();
}
}
internal/gc.h
void rb_objspace_set_event_hook(const rb_event_flag_t event);
VALUE rb_objspace_gc_enable(struct rb_objspace *);
VALUE rb_objspace_gc_disable(struct rb_objspace *);
void ruby_gc_set_params(void);
void ruby_gc_set_params(bool);
void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
#if __has_attribute(alloc_align)
__attribute__((__alloc_align__(1)))
ruby.c
translit_char(RSTRING_PTR(opt->script_name), '\\', '/');
#endif
ruby_gc_set_params();
ruby_gc_set_params(true);
ruby_init_loadpath();
#if USE_MJIT
(3-3/3)