part2 ver 0.8.1
This commit is contained in:
parent
583a23a507
commit
0461df7cee
|
@ -26,9 +26,7 @@ int main() {
|
||||||
|
|
||||||
// [2.1] TODO: Put your capture-the-flag code here
|
// [2.1] TODO: Put your capture-the-flag code here
|
||||||
for (int j = 0; j < 1024; j++) {
|
for (int j = 0; j < 1024; j++) {
|
||||||
for(int i = 0; i < 1024; i++) {
|
clflush((ADDR_PTR)buf + j * 128);
|
||||||
clflush((ADDR_PTR)buf + i * 128);
|
|
||||||
}
|
|
||||||
for(int i = 0; i < WAIT_TIME; i++);
|
for(int i = 0; i < WAIT_TIME; i++);
|
||||||
time = measure_one_block_access_time((ADDR_PTR)buf + j * 128);
|
time = measure_one_block_access_time((ADDR_PTR)buf + j * 128);
|
||||||
if(time < CACHE_HIT_THRESHOLD) {
|
if(time < CACHE_HIT_THRESHOLD) {
|
||||||
|
|
Loading…
Reference in New Issue