summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authortmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-05 00:19:13 +0000
committertmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-05 00:19:13 +0000
commit53e0d4666cbbc09abe459e99c6f94c46b58b94b9 (patch)
tree2bed1a82852c6a222cb25da11250915cdb48a7a5 /ruby.c
parent46b4eca8e2807122c99e7dcd1725464b5918f060 (diff)
gc.c: Load GC tuning settings earlier during boot.
* gc.c (ruby_gc_set_params): Accept safe_level argument so GC tuning settings can be applied before rb_safe_level() is available. * internal.h (rb_gc_set_params): ditto. * ruby.c (process_options): Apply GC tuning early during boot process so boot-time allocations can benefit. This also benefits any code loaded in via `ruby -r`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 034425e..a871242 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1405,6 +1405,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
translit_char(RSTRING_PTR(opt->script_name), '\\', '/');
#endif
+ ruby_gc_set_params(opt->safe_level);
ruby_init_loadpath_safe(opt->safe_level);
Init_enc();
rb_enc_find_index("encdb");
@@ -1568,7 +1569,6 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
rb_define_readonly_boolean("$-a", opt->do_split);
rb_set_safe_level(opt->safe_level);
- ruby_gc_set_params();
return iseq;
}