part2 ver 0.7.1

This commit is contained in:
ClF3 2024-11-05 10:15:29 +08:00
parent b27c59b282
commit 3a1adc81ce
1 changed files with 4 additions and 4 deletions

View File

@ -41,13 +41,13 @@ int main() {
time = measure_one_block_access_time((ADDR_PTR)buf + offset * 128); time = measure_one_block_access_time((ADDR_PTR)buf + offset * 128);
if(time < CACHE_HIT_THRESHOLD) { if(time < CACHE_HIT_THRESHOLD) {
// clflush((ADDR_PTR)buf + offset * 128); // clflush((ADDR_PTR)buf + offset * 128);
for(int i = 0; i < WAIT_TIME; i++); // for(int i = 0; i < WAIT_TIME; i++);
new_time = measure_one_block_access_time((ADDR_PTR)buf + offset * 128); // new_time = measure_one_block_access_time((ADDR_PTR)buf + offset * 128);
if(new_time < CACHE_HIT_THRESHOLD) { // if(new_time < CACHE_HIT_THRESHOLD) {
flag = offset; flag = offset;
index = i; index = i;
break; break;
} // }
} }
} }
} }