X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread_win32_osx.h;h=5583a06e33f357924647df66fbc3d0a4fd4c9c45;hp=8890054020459b0d57ca445ed4a17b9ab6c4c66d;hb=a858defd332bddd828c9280a9e326a0b750b3dda;hpb=bad18bccb60c874410edd3f61624696d3abc3cbc diff --git a/src/thread_win32_osx.h b/src/thread_win32_osx.h index 88900540..5583a06e 100644 --- a/src/thread_win32_osx.h +++ b/src/thread_win32_osx.h @@ -73,11 +73,14 @@ typedef std::condition_variable ConditionVariable; /// adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with /// proper stack size parameter. -#if defined(__APPLE__) +/// On toolchains where pthread is always available, ensure minimum stack size +/// instead of relying on linker defaults which may be platform-specific. + +#if defined(__APPLE__) || defined(__MINGW32__) || defined(__MINGW64__) #include -static const size_t TH_STACK_SIZE = 2 * 1024 * 1024; +static const size_t TH_STACK_SIZE = 8 * 1024 * 1024; template > void* start_routine(void* ptr)