Properly initialize the TT in a multithreaded way again

This commit is contained in:
Disservin
2024-06-04 07:53:25 +02:00
parent ba06671aa9
commit 7f09d06b83
2 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -96,6 +96,7 @@ class TranspositionTable {
static constexpr int GENERATION_MASK = (0xFF << GENERATION_BITS) & 0xFF;
public:
~TranspositionTable() { aligned_large_pages_free(table); }
void new_search() {
// increment by delta to keep lower bits as is
generation8 += GENERATION_DELTA;
@@ -115,9 +116,9 @@ class TranspositionTable {
private:
friend struct TTEntry;
size_t clusterCount;
LargePagePtr<Cluster[]> table;
uint8_t generation8 = 0; // Size must be not bigger than TTEntry::genBound8
size_t clusterCount;
Cluster* table = nullptr;
uint8_t generation8 = 0; // Size must be not bigger than TTEntry::genBound8
};
} // namespace Stockfish