]> git.sesse.net Git - stockfish/blobdiff - src/tt.cpp
Raise max Hash to 1TB
[stockfish] / src / tt.cpp
index 248cbad96d930baebe75d7bae3536145a69ccd1a..46d891cd04f1558e76b0f2b9161d872c1928694a 100644 (file)
@@ -30,11 +30,9 @@ TranspositionTable TT; // Our global transposition table
 /// measured in megabytes. Transposition table consists of a power of 2 number
 /// of clusters and each cluster consists of TTClusterSize number of TTEntry.
 
-void TranspositionTable::resize(uint64_t mbSize) {
+void TranspositionTable::resize(size_t mbSize) {
 
-  assert(msb((mbSize * 1024 * 1024) / sizeof(TTCluster)) < 32);
-
-  uint32_t newClusterCount = 1 << msb((mbSize * 1024 * 1024) / sizeof(TTCluster));
+  size_t newClusterCount = size_t(1) << msb((mbSize * 1024 * 1024) / sizeof(TTCluster));
 
   if (newClusterCount == clusterCount)
       return;