Right size the vm_default_params hash

This commit is contained in:
Lourens Naudé 2019-10-21 23:49:54 +01:00 committed by 卜部昌平
parent 0e68913f81
commit 0095362918
Notes: git 2019-10-29 11:32:12 +09:00

2
vm.c
View File

@ -2373,7 +2373,7 @@ static VALUE
vm_default_params(void)
{
rb_vm_t *vm = GET_VM();
VALUE result = rb_hash_new();
VALUE result = rb_hash_new_with_size(4);
#define SET(name) rb_hash_aset(result, ID2SYM(rb_intern(#name)), SIZET2NUM(vm->default_params.name));
SET(thread_vm_stack_size);
SET(thread_machine_stack_size);