X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftt.cpp;h=354ead87adb34dac0a007dcf064067fe9362b9d8;hp=a1ef44422832781d1325232da2d30a3a48582149;hb=2ba47416cbdd5db2c7c79257072cd8675b61721f;hpb=7d4d3a2c3a4c6ce96bdbcfecf373934fdccc9b07 diff --git a/src/tt.cpp b/src/tt.cpp index a1ef4442..354ead87 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -41,7 +41,7 @@ void TranspositionTable::resize(size_t mbSize) { clusterCount = newClusterCount; free(mem); - mem = calloc(clusterCount * sizeof(Cluster) + CacheLineSize - 1, 1); + mem = malloc(clusterCount * sizeof(Cluster) + CacheLineSize - 1); if (!mem) { @@ -51,6 +51,7 @@ void TranspositionTable::resize(size_t mbSize) { } table = (Cluster*)((uintptr_t(mem) + CacheLineSize - 1) & ~(CacheLineSize - 1)); + clear(); }