mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Properly initialize the TT in a multithreaded way again
This commit is contained in:
+3
-1
@@ -75,9 +75,11 @@ uint8_t TTEntry::relative_age(const uint8_t generation8) const {
|
||||
// measured in megabytes. Transposition table consists
|
||||
// of clusters and each cluster consists of ClusterSize number of TTEntry.
|
||||
void TranspositionTable::resize(size_t mbSize, ThreadPool& threads) {
|
||||
aligned_large_pages_free(table);
|
||||
|
||||
clusterCount = mbSize * 1024 * 1024 / sizeof(Cluster);
|
||||
|
||||
table = make_unique_large_page<Cluster[]>(clusterCount);
|
||||
table = static_cast<Cluster*>(aligned_large_pages_alloc(clusterCount * sizeof(Cluster)));
|
||||
|
||||
if (!table)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user