aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-15 10:38:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-15 10:38:58 +0000
commit9ab5e3f7e5cb5417937f06c48311b2709edee221 (patch)
treee23f2ed77d0b126c051439bc867bb445bd99c9bc /vm.c
parent524b33b1fd0aec2e5b889295197a946c9472867a (diff)
downloadruby-9ab5e3f7e5cb5417937f06c48311b2709edee221.tar.gz
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.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/vm.c b/vm.c
index 951165694a..bd996c5ca7 100644
--- a/vm.c
+++ b/vm.c
@@ -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();