Threads.main()->wait_for_search_finished();
- clusterCount = mbSize * 1024 * 1024 / sizeof(Cluster);
-
free(mem);
- mem = malloc(clusterCount * sizeof(Cluster) + CacheLineSize - 1);
+ clusterCount = mbSize * 1024 * 1024 / sizeof(Cluster);
+ table = static_cast<Cluster*>(aligned_ttmem_alloc(clusterCount * sizeof(Cluster), &mem));
if (!mem)
{
std::cerr << "Failed to allocate " << mbSize
exit(EXIT_FAILURE);
}
- table = (Cluster*)((uintptr_t(mem) + CacheLineSize - 1) & ~(CacheLineSize - 1));
clear();
}