-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (30 loc) · 771 Bytes
/
main.cpp
File metadata and controls
36 lines (30 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Main class for Assignment2
* The trace file name should be specified as the first (and only) command line
* argument to the program.
*/
/*
* File: main.cpp
* Created By: Peter Gish
* Last Modified: 2/17/18
*/
#include <cstdlib>
#include <iostream>
#include <MMU.h>
#include "ProcessTrace.h"
using namespace std;
/*
* Create an instance of the MMU class with 256 (0x100) page frames (1MB of simulated
* physical memory). Do not enable TLB. Need to enable virtual memory mode
* and construct page tables
*/
int main(int argc, char** argv) {
mem::MMU mem(0x100);
if(argc != 2){
std::cerr << "usage: Assignment 2 input_file" << std::endl;
exit(1);
}
ProcessTrace trace(argv[1]);
trace.Execute();
return 0;
}