mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Disable GC until VM objects get initialized [Bug #16616]
This commit is contained in:
parent
aeaf0dc555
commit
0f05b234fb
3 changed files with 4 additions and 0 deletions
1
gc.c
1
gc.c
|
@ -1623,6 +1623,7 @@ rb_objspace_alloc(void)
|
|||
malloc_limit = gc_params.malloc_limit_min;
|
||||
list_head_init(&objspace->eden_heap.pages);
|
||||
list_head_init(&objspace->tomb_heap.pages);
|
||||
dont_gc = TRUE;
|
||||
|
||||
return objspace;
|
||||
}
|
||||
|
|
|
@ -1150,6 +1150,7 @@ q.pop
|
|||
"0 thread_machine_stack_size")
|
||||
assert_operator(h_default[:thread_machine_stack_size], :<=, h_large[:thread_machine_stack_size],
|
||||
"large thread_machine_stack_size")
|
||||
assert_equal("ok", invoke_rec('print :ok', 1024 * 1024 * 100, nil, false))
|
||||
end
|
||||
|
||||
def test_vm_machine_stack_size
|
||||
|
|
2
vm.c
2
vm.c
|
@ -3345,6 +3345,8 @@ Init_vm_objects(void)
|
|||
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, 10000);
|
||||
|
||||
rb_objspace_gc_enable(vm->objspace);
|
||||
}
|
||||
|
||||
/* top self */
|
||||
|
|
Loading…
Add table
Reference in a new issue