mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Clear TableBase mappings in Search::clear()
This patch will make possible to free mapped TB files with "ucinewgame" command. We wrote this patch specifically to address a problem that arose while running Stockfish with 7-piece tablebases as a kibitzer at TCEC for extended periods of time across multiple games. It was noted that after some time, the NPS of the kibitzing Stockfish (which is usually 3x faster than the Stockfish actually competing) would drop precipitously, eventually falling to preposterously low numbers until restarted. Their eval bot basically inputs FEN, go infinite, stop and loop, it probably didn't do ucinewgame either. As time goes it gradually slowed down and OS starts to use swap, this is not reasonable since the engine only uses 16GB hash and the machine has 1TB physical RAM and does nothing else. Author : noobpwnftw Closes https://github.com/official-stockfish/Stockfish/pull/1790 No functional change.
This commit is contained in:
@@ -43,7 +43,6 @@ int main(int argc, char* argv[]) {
|
|||||||
Bitbases::init();
|
Bitbases::init();
|
||||||
Search::init();
|
Search::init();
|
||||||
Pawns::init();
|
Pawns::init();
|
||||||
Tablebases::init(Options["SyzygyPath"]); // After Bitboards are set
|
|
||||||
Threads.set(Options["Threads"]);
|
Threads.set(Options["Threads"]);
|
||||||
Search::clear(); // After threads are up
|
Search::clear(); // After threads are up
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ void Search::clear() {
|
|||||||
Time.availableNodes = 0;
|
Time.availableNodes = 0;
|
||||||
TT.clear();
|
TT.clear();
|
||||||
Threads.clear();
|
Threads.clear();
|
||||||
|
Tablebases::init(Options["SyzygyPath"]); // Free up mapped files
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user