Index: platform/thread_macos.cc |
=================================================================== |
--- platform/thread_macos.cc (revision 8702) |
+++ platform/thread_macos.cc (working copy) |
@@ -71,12 +71,7 @@ |
result = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); |
RETURN_ON_PTHREAD_FAILURE(result); |
-#if DEBUG |
- const int kStackSize = (128 * KB); |
-#else |
- const int kStackSize = (64 * KB); |
-#endif |
- result = pthread_attr_setstacksize(&attr, kStackSize); |
+ result = pthread_attr_setstacksize(&attr, Thread::GetMaxStackSize()); |
RETURN_ON_PTHREAD_FAILURE(result); |
ThreadStartData* data = new ThreadStartData(function, parameter); |
@@ -118,6 +113,12 @@ |
} |
+intptr_t Thread::GetMaxStackSize() { |
+ const int kStackSize = (256 * KB); |
+ return kStackSize; |
+} |
+ |
+ |
Mutex::Mutex() { |
pthread_mutexattr_t attr; |
int result = pthread_mutexattr_init(&attr); |