Daily bit(e) of C++ | std::hardware_destructive_interference_size, std::hardware_constructive_interference_size
Daily bit(e) of C++ #451, The two C++17 constants for aligning data to prevent false sharing or ensure true sharing.
C++17 introduced two simple constants that can be used to prevent false sharing or to ensure true sharing.
The destructive size specifies the minimum offset between two objects to prevent false sharing, and the constructive size specifies the maximum size of continuous memory capable of true sharing.