public void reference(int frameId, int step) { vm.setReference(frameId); //if the new reference is not in the page table, add it if (!pt.inPageTable(frameId)) { pt.addPage(frameId, step); } else { //if it is, reference it pt.reference(frameId, step); } }
public void addReference(int frameId, int step) { vm.setReference(frameId); //if the new reference is not in the page table, add it if (!pt.inPageTable(frameId)) { Console.WriteLine("CALLED."); pt.addPage(frameId, step); } else { //TODO: if it is, signal the reference Console.WriteLine("REF FOUND."); } }