summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2020-01-15 14:40:01 +0100
committerNARUSE, Yui <naruse@airemix.jp>2020-03-13 21:51:06 +0900
commit215eb86a7729bf0db487f399031ad55a1062fada (patch)
tree08bcf489d33dc6a72e3e941afc29c6aef966e1ba /vm.c
parent8a54630a6608d9b1a9d32db2ba33289a5454810d (diff)
Increase the frozen_strings table initial size
It was set to 1000 in a4a2b9be7a55bb61d17cf9673ed0d2a93bb52d31. However on ruby-2.7.0p0, there are much more than 1k frozen string right after boot: ``` $ ruby -robjspace -e 'p ObjectSpace.each_object(String).select { |s| s.frozen? && ObjectSpace.dump(s).include?(%{"fstring":true})}.uniq.count' 5948 ```
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index bb3ffae078..bf33d2799a 100644
--- a/vm.c
+++ b/vm.c
@@ -3330,7 +3330,7 @@ Init_vm_objects(void)
/* initialize mark object array, hash */
vm->mark_object_ary = rb_ary_tmp_new(128);
vm->loading_table = st_init_strtable();
- vm->frozen_strings = st_init_table_with_size(&rb_fstring_hash_type, 1000);
+ vm->frozen_strings = st_init_table_with_size(&rb_fstring_hash_type, 10000);
}
/* top self */