Merge remote-tracking branch 'upstream/master' into merge_attempt

This commit is contained in:
Tomasz Sobczyk
2020-09-24 20:34:29 +02:00
26 changed files with 1082 additions and 921 deletions
+4 -3
View File
@@ -64,11 +64,12 @@ void TranspositionTable::resize(size_t mbSize) {
Threads.main()->wait_for_search_finished();
aligned_ttmem_free(mem);
aligned_large_pages_free(table);
clusterCount = mbSize * 1024 * 1024 / sizeof(Cluster);
table = static_cast<Cluster*>(aligned_ttmem_alloc(clusterCount * sizeof(Cluster), mem));
if (!mem)
table = static_cast<Cluster*>(aligned_large_pages_alloc(clusterCount * sizeof(Cluster)));
if (!table)
{
std::cerr << "Failed to allocate " << mbSize
<< "MB for transposition table." << std::endl;