parent
5d0fb9c694
commit
1de445c64a
|
@ -15,7 +15,6 @@
|
||||||
int main() {
|
int main() {
|
||||||
int index = -1;
|
int index = -1;
|
||||||
int flag = -1;
|
int flag = -1;
|
||||||
int maybe_flag= -1;
|
|
||||||
CYCLES time = -1;
|
CYCLES time = -1;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
int new_offset = 0;
|
int new_offset = 0;
|
||||||
|
@ -37,15 +36,10 @@ 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) {
|
||||||
if(offset == maybe_flag) {
|
|
||||||
flag = offset;
|
flag = offset;
|
||||||
index = i;
|
index = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
maybe_flag = offset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
printf("Flag: %d\n", flag);
|
printf("Flag: %d\n", flag);
|
||||||
printf("Time: %d\n", time);
|
printf("Time: %d\n", time);
|
||||||
|
|
Loading…
Reference in New Issue