- table = (TTEntry*)((size_t(mem) + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1));
- hashMask = size - ClusterSize;
- clear(); // Newly allocated block of memory is not initialized
+ // Align table start address to a cache line
+ for (char* c = (char*)mem; unsigned(table = (TTEntry*)(c)) % CACHE_LINE_SIZE; c++) {}
+ clear(); // Operator new is not guaranteed to initialize memory to zero