?? memoryallocate.java
字號:
package cn.edu.cauc.crab.ossimulate;import java.util.*;/** * <p>Title: OS simulate</p> * <p>Description: This is my home work.</p> * <p>Copyright: Copyleft (c) 2004</p> * <p>Company: CAUC</p> * @author Crab * @version 0.1 */class MemoryRequest { static int NEW = 0; static int DELECT = 1; int mode; int begin; int size;}class PT { int beging; int size;}abstract public class MemoryAllocate { int memorySize; List fpt = new LinkedList(); List upt = new LinkedList(); List request = new LinkedList(); public MemoryAllocate(int memorySize) { this.memorySize = memorySize; PT pt = new PT(); pt.beging = 0; pt.size = this.memorySize; this.fpt.add(pt); } public void addRequest(int mode, int begin, int size) { MemoryRequest m = new MemoryRequest(); m.mode = mode; m.begin = begin; m.size = size; this.request.add(m); } abstract public void start(); /* public static void main(String[] args) { MemoryAllocate memoryAllocate1 = new MemoryAllocate(100); System.out.println("crab"); }*/}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -