This time revert to original version but using
uintptr_t instead of size_t
Suggested by Lucas.
No functional change.
- // Align table start address to a cache line
- for (char* c = (char*)mem; unsigned(table = (TTEntry*)(c)) % CACHE_LINE_SIZE; c++) {}
+ table = (TTEntry*)((uintptr_t(mem) + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1));
clear(); // Operator new is not guaranteed to initialize memory to zero
}
clear(); // Operator new is not guaranteed to initialize memory to zero
}