part2 ver 0.8.1

This commit is contained in:
ClF3 2024-11-05 10:41:10 +08:00
parent 583a23a507
commit 0461df7cee
1 changed files with 1 additions and 3 deletions

View File

@ -26,9 +26,7 @@ int main() {
// [2.1] TODO: Put your capture-the-flag code here
for (int j = 0; j < 1024; j++) {
for(int i = 0; i < 1024; i++) {
clflush((ADDR_PTR)buf + i * 128);
}
clflush((ADDR_PTR)buf + j * 128);
for(int i = 0; i < WAIT_TIME; i++);
time = measure_one_block_access_time((ADDR_PTR)buf + j * 128);
if(time < CACHE_HIT_THRESHOLD) {