part2 ver 0.2.2
This commit is contained in:
parent
a5c6a2bd5f
commit
73dfe68cdf
|
@ -21,10 +21,10 @@ int main() {
|
|||
clflush((ADDR_PTR)buf + i * 128);
|
||||
}
|
||||
for(int i = 0; i < WAIT_TIME; i++);
|
||||
for(int i = 0; i < 1024; i++) {
|
||||
time = measure_one_block_access_time((ADDR_PTR)buf + (i * 10020107) % 1024 * 128);
|
||||
for(int i = 100; i < 10000; i++) {
|
||||
time = measure_one_block_access_time((ADDR_PTR)buf + (i*i) / 1024 % 1024 * 128);
|
||||
if(time < CACHE_HIT_THRESHOLD) {
|
||||
flag = (i * 10020107) % 1024;
|
||||
flag = (i*i) / 1024 % 1024;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue