Revert some unwanted changes from merge conflict resolution.

This commit is contained in:
Tomasz Sobczyk
2020-09-24 21:10:10 +02:00
parent 56f1a2fe49
commit 9f3de8b40e
3 changed files with 15 additions and 20 deletions

View File

@@ -408,11 +408,23 @@ 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;
// Fall back to regular, page aligned, allocation if necessary
if (!mem)
mem = VirtualAlloc(NULL, allocSize, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);