Commit 8bae36f9 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Platform] Increase default stack size on Mac OS X to 1MB.

The default stack size of a background thread is 512KB on MacOSX. We default to
1MB stack checks when compiling JS code, so we need to increase this limit
to enable compilation of JS code onto background threads.

Corresponding Chromium CL is https://codereview.chromium.org/2640803002/

BUG=v8:5203

Review-Url: https://codereview.chromium.org/2653673007
Cr-Commit-Position: refs/heads/master@{#42650}
parent a4183e59
......@@ -620,12 +620,15 @@ void Thread::Start() {
result = pthread_attr_init(&attr);
DCHECK_EQ(0, result);
size_t stack_size = stack_size_;
#if V8_OS_AIX
if (stack_size == 0) {
// Default on AIX is 96KB -- bump up to 2MB
#if V8_OS_MACOSX
// Default on Mac OS X is 512kB -- bump up to 1MB
stack_size = 1 * 1024 * 1024;
#elif V8_OS_AIX
// Default on AIX is 96kB -- bump up to 2MB
stack_size = 2 * 1024 * 1024;
}
#endif
}
if (stack_size > 0) {
result = pthread_attr_setstacksize(&attr, stack_size);
DCHECK_EQ(0, result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment