]> git.sesse.net Git - stockfish/blobdiff - src/tt.cpp
Fix a Windows-only crash on exit without 'quit'
[stockfish] / src / tt.cpp
index 46860fe900df5b9157d3cbafa5e932c688e0de83..4e06bed93451d867fdc49e4d6c11fc26b0ad27ef 100644 (file)
@@ -63,10 +63,10 @@ void TranspositionTable::resize(size_t mbSize) {
 
   Threads.main()->wait_for_search_finished();
 
-  free(mem);
+  aligned_ttmem_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