]> git.sesse.net Git - stockfish/commit
Raise stack size to 8MB for pthreads
authornoobpwnftw <guo.bojun@gmail.com>
Sat, 14 Sep 2019 16:18:10 +0000 (00:18 +0800)
committerStéphane Nicolet <cassio@free.fr>
Mon, 16 Sep 2019 13:09:45 +0000 (15:09 +0200)
commita858defd332bddd828c9280a9e326a0b750b3dda
tree0a0c3002c97bc413744bd302232eda77c1095990
parent7b064752943b67eaa7ef93f1109acfad50b4ecc2
Raise stack size to 8MB for pthreads

It seems there is no other way to specify stack size on std::thread than linker
flags and the effective flags are named differently in many toolchains. On
toolchains where pthread is always available, this patch changes the stack
size change in our C++ code via pthread to ensure a minimum stack size of 8MB,
instead of relying on linker defaults which may be platform-specific.

Also raises default stack size on OSX to current Linux default (8MB) just to
be safe.

Closes https://github.com/official-stockfish/Stockfish/pull/2303

No functional change
src/thread_win32_osx.h