aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-05 13:53:19 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-19 20:39:10 +1200
commit7c7a1c221281cdba1f48d5e42ee2f9af306d27f8 (patch)
treef8d557230a7828a2ec6be9636c76def38a0a51f6 /thread_pthread.c
parentb24603adff8ec1e93e71358b93b3e30c99ba29d5 (diff)
downloadruby-7c7a1c221281cdba1f48d5e42ee2f9af306d27f8.tar.gz
Fix handling of vm_stack_size and avoid trying to deallocate it.
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 515f13b1a5..5cbe9e041b 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1157,7 +1157,7 @@ native_thread_create(rb_thread_t *th)
}
else {
pthread_attr_t attr;
- const size_t stack_size = th->vm->default_params.thread_machine_stack_size;
+ const size_t stack_size = th->vm->default_params.thread_machine_stack_size + th->vm->default_params.thread_vm_stack_size;
const size_t space = space_size(stack_size);
th->ec->machine.stack_maxsize = stack_size - space;