As mentioned by cmartin,
[We] can probably replace all the volatile stuff in the code with regular old non-volatile, non-atomic reads and writes, and instead there would be a per-thread atomic variable (per-thread because threads never actually access each other's memory test regions) that would need to be written with Ordering::Release and then immediately read again with Ordering::Acquire to force synchronization. That would need to be done between each read/write pass of the memtest.
This will make it more likely to bypass the cache and test actual memory.
This will also make the code for memory reads/writes more straightforward, and allow the use of copy_nonoverlapping for BlockMoveTest.
As mentioned by cmartin,
This will make it more likely to bypass the cache and test actual memory.
This will also make the code for memory reads/writes more straightforward, and allow the use of
copy_nonoverlappingfor BlockMoveTest.