Increase stack size for Windows and macOS (#29)
authorFabian Fichter <ianfab@users.noreply.github.com>
Wed, 21 Aug 2019 19:13:38 +0000 (21:13 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 21 Aug 2019 19:13:38 +0000 (21:13 +0200)
Account for recent increase of stack usage.

src/thread_win32_osx.h
src/types.h

index 6c57fd9..e267118 100644 (file)
@@ -77,7 +77,7 @@ typedef std::condition_variable ConditionVariable;
 
 #include <pthread.h>
 
-static const size_t TH_STACK_SIZE = 4 * 1024 * 1024;
+static const size_t TH_STACK_SIZE = 8 * 1024 * 1024;
 
 template <class T, class P = std::pair<T*, void(T::*)()>>
 void* start_routine(void* ptr)
index 7600312..7628626 100644 (file)
@@ -49,7 +49,7 @@
 #pragma warning(disable: 4127) // Conditional expression is constant
 #pragma warning(disable: 4146) // Unary minus operator applied to unsigned type
 #pragma warning(disable: 4800) // Forcing value to bool 'true' or 'false'
-#pragma comment(linker, "/STACK:4000000") // Use 4 MB stack size for MSVC
+#pragma comment(linker, "/STACK:8000000") // Use 8 MB stack size for MSVC
 #endif
 
 /// Predefined macros hell: