From 46b971b48dbc4cdf9db31a843945410f5a51eba2 Mon Sep 17 00:00:00 2001
From: Eric Wong <e@80x24.org>
Date: Tue, 2 Sep 2014 21:19:03 +0000
Subject: [PATCH] vm.c: remove unused USE_THREAD_RECYCLE

Unused feature, and it is a no-op even if enabled.
---
 vm.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/vm.c b/vm.c
index cd80729..1756375 100644
--- a/vm.c
+++ b/vm.c
@@ -1971,16 +1971,6 @@ rb_thread_recycle_stack_release(VALUE *stack)
     ruby_xfree(stack);
 }
 
-#ifdef USE_THREAD_RECYCLE
-static rb_thread_t *
-thread_recycle_struct(void)
-{
-    void *p = ALLOC_N(rb_thread_t, 1);
-    memset(p, 0, sizeof(rb_thread_t));
-    return p;
-}
-#endif
-
 void
 rb_thread_mark(void *ptr)
 {
@@ -2138,13 +2128,9 @@ static VALUE
 thread_alloc(VALUE klass)
 {
     VALUE volatile obj;
-#ifdef USE_THREAD_RECYCLE
-    rb_thread_t *th = thread_recycle_struct();
-    obj = TypedData_Wrap_Struct(klass, &thread_data_type, th);
-#else
     rb_thread_t *th;
     obj = TypedData_Make_Struct(klass, rb_thread_t, &thread_data_type, th);
-#endif
+
     return obj;
 }
 
-- 
EW

