From a0fed28e8112ae2276aea99e22e2c9fff9dd6c12 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 12 Nov 2009 07:34:51 +0000 Subject: * vm.c (thread_recycle_stack, rb_thread_recycle_stack_release): stack belongs to no object space. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/mvm@25731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ vm.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c177914732..ae31f08159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 12 16:34:49 2009 Nobuyoshi Nakada + + * vm.c (thread_recycle_stack, rb_thread_recycle_stack_release): + stack belongs to no object space. + Thu Nov 12 14:33:21 2009 Nobuyoshi Nakada * thread_win32.c (thread_errno): CreateThread does not set errno. diff --git a/vm.c b/vm.c index 4eef4c7cdd..9688357f7f 100644 --- a/vm.c +++ b/vm.c @@ -1559,12 +1559,12 @@ thread_recycle_stack(size_t size) return thread_recycle_stack_slot[--thread_recycle_stack_count]; } else { - return ALLOC_N(VALUE, size); + return malloc(sizeof(VALUE) * size); } } #else -#define thread_recycle_stack(size) ALLOC_N(VALUE, (size)) +#define thread_recycle_stack(size) malloc(sizeof(VALUE) * (size)) #endif void @@ -1576,7 +1576,7 @@ rb_thread_recycle_stack_release(VALUE *stack) return; } #endif - ruby_xfree(stack); + free(stack); } #ifdef USE_THREAD_RECYCLE -- cgit v1.2.1