Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding volatile modifier to tmp variable in memory test
Issue explanation: ./sysbench/sysbench --test=memory --num-threads=16 \ --memory-block-size=268435456 \ --memory-total-size=137438953472 \ --memory-oper=read \ --memory-access-mode=seq \ --memory-scope=local run Without this commit the time to run the above command is 0.0004 seconds. With this commit the time is greater than 3 seconds. Essentially, without the volatile modifier, the compiler optimizes read access so that no real access happens.
- Loading branch information