If two or more processor cores copy a variable into their local cache, how C++ handles that? Does &var return a different memory address depending on which core executed that instruction?
If two or more processor cores copy a variable into their local cache, how C++ handles that? Does &var return a different memory address depending on which core executed that instruction?
The address you get is the logical address in RAM not the address in cache. Its the cache controllers job to 'know' what RAM address are in what parts of its caches