diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-11 12:28:41 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-11 12:28:41 +0000 |
commit | d33ccac173969a3cb96b72d835a965bfa6decc3e (patch) | |
tree | 420ffa2f67db6864b25882a1f29b51543a968932 /vm.c | |
parent | 892e9111528833ede206fb69ad7389d307b73a56 (diff) | |
download | ruby-d33ccac173969a3cb96b72d835a965bfa6decc3e.tar.gz |
* backport r32815 from trunk.
* gc.c (init_heap): allocate sigaltstack after heaps are allocated.
[ruby-dev:44315] [Bug #5139]
* vm.c (thread_free): use free because objspace is not ready.
* vm.c (th_init): use malloc because objspace is not ready.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1761,7 +1761,7 @@ thread_free(void *ptr) else { #ifdef USE_SIGALTSTACK if (th->altstack) { - xfree(th->altstack); + free(th->altstack); } #endif ruby_xfree(ptr); @@ -1834,7 +1834,8 @@ th_init(rb_thread_t *th, VALUE self) /* allocate thread stack */ #ifdef USE_SIGALTSTACK - th->altstack = xmalloc(ALT_STACK_SIZE); + /* altstack of main thread is reallocated in another place */ + th->altstack = malloc(ALT_STACK_SIZE); #endif th->stack_size = RUBY_VM_THREAD_STACK_SIZE; th->stack = thread_recycle_stack(th->stack_size); |