diff options
Diffstat (limited to 'runtime/runtime.cc')
| -rw-r--r-- | runtime/runtime.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index a48e8271c2..84526f3332 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -922,10 +922,11 @@ void Runtime::InitNonZygoteOrPostFork( } if (thread_pool_ == nullptr) { - constexpr size_t kMaxRuntimeThreads = 4u; - thread_pool_.reset( - new ThreadPool("Runtime", std::min( - static_cast<size_t>(std::thread::hardware_concurrency()), kMaxRuntimeThreads))); + constexpr size_t kStackSize = 64 * KB; + constexpr size_t kMaxRuntimeWorkers = 4u; + const size_t num_workers = + std::min(static_cast<size_t>(std::thread::hardware_concurrency()), kMaxRuntimeWorkers); + thread_pool_.reset(new ThreadPool("Runtime", num_workers, /*create_peers=*/false, kStackSize)); thread_pool_->StartWorkers(Thread::Current()); } |