Flush the CPU data cache by reading and writing 100MB of new data.
| 26 | |
| 27 | /// Flush the CPU data cache by reading and writing 100MB of new data. |
| 28 | void |
| 29 | flushCache() |
| 30 | { |
| 31 | int hundredMegs = 100 * 1024 * 1024; |
| 32 | volatile char* block = new char[hundredMegs]; |
| 33 | for (int i = 0; i < hundredMegs; i++) |
| 34 | block[i] = 1; |
| 35 | delete[] block; |
| 36 | } |
| 37 | |
| 38 | /// Used in functionCall(). |
| 39 | uint64_t |
nothing calls this directly
no outgoing calls
no test coverage detected