📄 mmanage.h
字号:
// MManage.h: interface for the MManage class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MMANAGE_H__F8CC7E47_B9E2_4CD9_B094_747EF5CCA76E__INCLUDED_)
#define AFX_MMANAGE_H__F8CC7E47_B9E2_4CD9_B094_747EF5CCA76E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define Bsize 5 //物理块数目
#define Psize 400 //页的数目
struct MPage
{
int PageNum;//页面号
int Sign;//被访问标记
};
class MManage
{
public:
MManage();
int SearchSpace( ); //查找是否有空闲物理块
int SearchExist(int curpage); //查找该页面是否已调入内存
int SearchReplace( ); //查找可被置换的页面
void Display( ); //显示各物理块中的页面
void FIFO( ); //FIFO算法
void LRU( ); //LRU算法
void OPT( ); //OPTIMAL算法
void BlockClear( ); //物理块初始化
MPage * Block; //物理块指针
MPage * Page; //页面指针
virtual ~MManage();
};
#endif // !defined(AFX_MMANAGE_H__F8CC7E47_B9E2_4CD9_B094_747EF5CCA76E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -