I need to clarify for myself how exactly TBB Dynamic Memory Interface Replacement (tutorial 10.2.2) works.
As I understand it replaces stock memory manager with the TBB's scalable memory manager, which doesn't guarantee allocation on cash lines. I need to use cache_aligned_allocator explicitly, if false sharing becomes an issue. Right?
Allocator replacement is for better scalability comparing to stock runtime allocator. But you can use_aligned_mallocfunction on windows for better cache hits. It is replaced also for better scalability.
Another relevant question. Only frequently used variables need to be cache aligned, right?. For example, if x is cache aligned and used frequently, but y isn't cache aligned and used infrequently, it is not a problem if x and y have false sharing. No?