ruby-changes:56997
From: Nobuyoshi <ko1@a...>
Date: Tue, 13 Aug 2019 11:20:44 +0900 (JST)
Subject: [ruby-changes:56997] Nobuyoshi Nakada: c215a6f282 (master): Removed non-VM_OBJSPACE code
https://git.ruby-lang.org/ruby.git/commit/?id=c215a6f282 From c215a6f2822d2d0c09e90867baadb250fd31206c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 13 Aug 2019 11:03:54 +0900 Subject: Removed non-VM_OBJSPACE code It has not been used for 4 years, since r60856, e33b1690d06f867e45750bd8e3e8b06d78b5bc26. diff --git a/gc.c b/gc.c index 812cd19..158a57d 100644 --- a/gc.c +++ b/gc.c @@ -730,18 +730,9 @@ struct heap_page { https://github.com/ruby/ruby/blob/trunk/gc.c#L730 #define GET_HEAP_MARKING_BITS(x) (&GET_HEAP_PAGE(x)->marking_bits[0]) #endif -#ifndef ENABLE_VM_OBJSPACE -# define ENABLE_VM_OBJSPACE 1 -#endif - /* Aliases */ -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE #define rb_objspace (*rb_objspace_of(GET_VM())) #define rb_objspace_of(vm) ((vm)->objspace) -#else -static rb_objspace_t rb_objspace = {{GC_MALLOC_LIMIT_MIN}}; -#define rb_objspace_of(vm) (&rb_objspace) -#endif #define ruby_initial_gc_stress gc_params.gc_stress @@ -1422,11 +1413,7 @@ RVALUE_WHITE_P(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L1413 rb_objspace_t * rb_objspace_alloc(void) { -#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE rb_objspace_t *objspace = calloc(1, sizeof(rb_objspace_t)); -#else - rb_objspace_t *objspace = &rb_objspace; -#endif malloc_limit = gc_params.malloc_limit_min; list_head_init(&objspace->eden_heap.pages); list_head_init(&objspace->tomb_heap.pages); @@ -1472,9 +1459,6 @@ rb_objspace_free(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L1459 st_free_table(objspace->id_to_obj_tbl); st_free_table(objspace->obj_to_id_tbl); free_stack_chunks(&objspace->mark_stack); -#if !(defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE) - if (objspace == &rb_objspace) return; -#endif free(objspace); } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/