aboutsummaryrefslogtreecommitdiffstats
path: root/thread_win32.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-06 09:53:25 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-19 20:39:10 +1200
commit8121a523c3ea68898016ab3984b6c0240ff66995 (patch)
tree87cf7c48fb69673e6afb52e1f8f5c19ab32afdb3 /thread_win32.c
parentb8e4bea7806f481efab42f8d88ecba783c709042 (diff)
downloadruby-8121a523c3ea68898016ab3984b6c0240ff66995.tar.gz
Use stack size defaults for win32 threads.
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_win32.c b/thread_win32.c
index 545d0dd35b..b7bc214c54 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -592,7 +592,7 @@ thread_start_func_1(void *th_ptr)
static int
native_thread_create(rb_thread_t *th)
{
- size_t stack_size = 4 * 1024; /* 4KB is the minimum commit size */
+ const size_t stack_size = th->vm->default_params.thread_machine_stack_size + th->vm->default_params.thread_vm_stack_size;
th->thread_id = w32_create_thread(stack_size, thread_start_func_1, th);
if ((th->thread_id) == 0) {
@@ -831,7 +831,7 @@ mjit_worker(void *arg)
int
rb_thread_create_mjit_thread(void (*worker_func)(void))
{
- size_t stack_size = 4 * 1024; /* 4KB is the minimum commit size */
+ const size_t stack_size = th->vm->default_params.thread_machine_stack_size;
HANDLE thread_id = w32_create_thread(stack_size, mjit_worker, worker_func);
if (thread_id == 0) {
return FALSE;