free(mem);
clusterCount = mbSize * 1024 * 1024 / sizeof(Cluster);
- table = static_cast<Cluster*>(aligned_ttmem_alloc(clusterCount * sizeof(Cluster), &mem));
+ table = static_cast<Cluster*>(aligned_ttmem_alloc(clusterCount * sizeof(Cluster), mem));
if (!mem)
{
std::cerr << "Failed to allocate " << mbSize
int TranspositionTable::hashfull() const {
int cnt = 0;
- for (int i = 0; i < 1000 / ClusterSize; ++i)
+ for (int i = 0; i < 1000; ++i)
for (int j = 0; j < ClusterSize; ++j)
cnt += (table[i].entry[j].genBound8 & 0xF8) == generation8;
- return cnt * 1000 / (ClusterSize * (1000 / ClusterSize));
+ return cnt / ClusterSize;
}