]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Reallocate TT on threadpool resize.
[stockfish] / src / thread.cpp
index cab2d382f1737da5da250e304fcd6e4627b10cd6..43a38e804d83e698d04345bb084162728f95a59e 100644 (file)
@@ -26,6 +26,7 @@
 #include "thread.h"
 #include "uci.h"
 #include "syzygy/tbprobe.h"
+#include "tt.h"
 
 ThreadPool Threads; // Global object
 
@@ -136,6 +137,9 @@ void ThreadPool::set(size_t requested) {
           push_back(new Thread(size()));
       clear();
   }
+
+  // Reallocate the hash with the new threadpool size
+  TT.resize(Options["Hash"]);
 }
 
 /// ThreadPool::clear() sets threadPool data to initial values.