📄 memsim.h
字号:
/****************************************************************************** * memsim.h * This file is part of "Assignment 2: Memory Management" * Copyright (C) 2008 - c506001 (email: c506001@cse.hcmut.edu.vn ) * * Note: * ----- * These codes are used for reference, but not complete. Students can modified * them to satisfy the requirements. * * Content: * -------- * The include file of memsim.c * * System and Networking Department * Faculty of Computer Science and Engineering * Ho Chi Minh City University of Technology ******************************************************************************/#ifndef __MEMSIM_H__#define __MEMSIM_H__#define MAX_MEM_REQ 200#define MAX_NAME_LEN 20#define MAX_CMD_NAME_LEN 20/** * struct Options * @sysFile: file name of sysfile input (default: sys.conf) * @taskFile: file name of taskfile input (default: tasks.txt) **/struct Options { char sysFile[MAX_NAME_LEN]; char taskFile[MAX_NAME_LEN]; char outFile[MAX_NAME_LEN];};/** * struct MemRequest: * @cmd: command (START, ACCESS, FINISH) * @pid: process ID * mem: memsize or mem-addr or 0. **/struct MemRequest { int cmd; int pid; int mem; };/** * struct MemRequestList * @count: the number of memory requests * @elems: elements **/struct MemRequestList { int count; struct MemRequest elems[MAX_MEM_REQ];};/** * struct Output: * @outFile: output file name (default: output.txt) **/struct Output { char outFile[MAX_NAME_LEN];};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -