Use a per-thread array for generated moves

This greately reduces stack usage and is a
prerequisite for next patch.

Verified with 40K games both in single and SMP
case that there are no regressions.

No functional change.
This commit is contained in:
Marco Costalba
2013-09-26 19:25:50 +02:00
parent 7b2cda95d9
commit 800410eef1
4 changed files with 14 additions and 6 deletions

View 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);
}