mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 19:46:55 +08:00
Suppress info strings before 'uci'
On Windows, Stockfish wouldn't launch in some GUI because we output some info strings (about the use of large pages) before sending the 'uci' command. It seems more robust to suppress these info strings, and instead to add a proper section section in the Readme about large pages use. fixes https://github.com/official-stockfish/Stockfish/issues/3052 closes https://github.com/official-stockfish/Stockfish/pull/3147 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
3d5b2c8a51
commit
5e6a5e48e6
16
src/misc.cpp
16
src/misc.cpp
@@ -408,22 +408,8 @@ static void* aligned_large_pages_alloc_win(size_t allocSize) {
|
||||
|
||||
void* aligned_large_pages_alloc(size_t allocSize) {
|
||||
|
||||
static bool firstCall = true;
|
||||
void* mem;
|
||||
|
||||
// Try to allocate large pages
|
||||
mem = aligned_large_pages_alloc_win(allocSize);
|
||||
|
||||
// Suppress info strings on the first call. The first call occurs before 'uci'
|
||||
// is received and in that case this output confuses some GUIs.
|
||||
if (!firstCall)
|
||||
{
|
||||
if (mem)
|
||||
sync_cout << "info string Hash table allocation: Windows large pages used." << sync_endl;
|
||||
else
|
||||
sync_cout << "info string Hash table allocation: Windows large pages not used." << sync_endl;
|
||||
}
|
||||
firstCall = false;
|
||||
void* mem = aligned_large_pages_alloc_win(allocSize);
|
||||
|
||||
// Fall back to regular, page aligned, allocation if necessary
|
||||
if (!mem)
|
||||
|
||||
Reference in New Issue
Block a user