4 ms·
doesn't C have keywords like volatile to insist reading from RAM?
by DoctorOetker 3y ago
doesn't C have keywords like volatile to insist reading from RAM?
- vlovich123 3y agoI would seriously doubt there’s many instances of writing to a single volatile memory location at 1ghz (excluding benchmarks).
- aidenn0 3y agoVolatile requires it emit instructions that access the object. So if the object is in RAMA, it will emit memory access instructions. However, on modern CPUs, that will still hit the cache. You need to either map in the memory as uncached, or flush the caches to force a memory access
- pbalcer 3y agono, that won't work. You'd have to clflush after every store. And even then, the cacheline might only ever get to the write pending queue (wpq) - and that you can't control.