memsim.h

来自「solutions for some problems in Linux」· C头文件 代码 · 共 69 行

H
69
字号
/****************************************************************************** * 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 + =
减小字号Ctrl + -
显示快捷键?