diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-15 10:38:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-15 10:38:58 +0000 |
commit | abbd388431b570395db0806ebbb4626c86cfd973 (patch) | |
tree | e23f2ed77d0b126c051439bc867bb445bd99c9bc /vm.c | |
parent | 70b2af3b211f9746a5f9fe6bd76cc0fff3fbe2b0 (diff) |
gc.c: define objspace functions always
* gc.c (rb_objspace_alloc, rb_objspace_free): define always
regardless ENABLE_VM_OBJSPACE, and free heap pages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -1861,9 +1861,7 @@ ruby_vm_destruct(rb_vm_t *vm) if (vm) { rb_thread_t *th = vm->main_thread; -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE struct rb_objspace *objspace = vm->objspace; -#endif vm->main_thread = 0; if (th) { rb_fiber_reset_root_local_storage(th->self); @@ -1872,11 +1870,9 @@ ruby_vm_destruct(rb_vm_t *vm) rb_vm_living_threads_init(vm); ruby_vm_run_at_exit_hooks(vm); rb_vm_gvl_destroy(vm); -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE if (objspace) { rb_objspace_free(objspace); } -#endif /* after freeing objspace, you *can't* use ruby_xfree() */ ruby_mimfree(vm); ruby_current_vm = 0; @@ -2800,9 +2796,7 @@ Init_BareVM(void) rb_thread_set_current_raw(th); vm_init2(vm); -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE vm->objspace = rb_objspace_alloc(); -#endif ruby_current_vm = vm; Init_native_thread(); |