This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <getopt.h> | |
| #include <unistd.h> | |
| #include <math.h> // used to help calculate set and block | |
| #include "cachelab.h" | |
| /* | |
| * Simulates a cache logic with a write-back and LRU (least recently used) policy. | |
| * Handles direct-mapped, set-associative and full-associative caches. |