Use a per-thread array for generated moves
[stockfish] / src / thread.cpp
index 7d85db8..c385f05 100644 (file)
@@ -83,10 +83,11 @@ void ThreadBase::wait_for(volatile const bool& b) {
 Thread::Thread() /* : splitPoints() */ { // Value-initialization bug in MSVC
 
   searching = false;
-  maxPly = splitPointsSize = 0;
+  maxPly = splitPointsSize = curPage = 0;
   activeSplitPoint = NULL;
   activePosition = NULL;
   idx = Threads.size();
+  movePages.resize(MAX_PLY_PLUS_6 * MAX_MOVES);
 }