www.pudn.com > Mos.rar > Mos_stor.h


// Mos_stor.h: interface for the CMos_stor class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_MOS_STOR_H__8B275FA6_B9EE_44BF_8707_3819D0561BCD__INCLUDED_) 
#define AFX_MOS_STOR_H__8B275FA6_B9EE_44BF_8707_3819D0561BCD__INCLUDED_ 
 
#include "Mos_UI.h"	// Added by ClassView 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
struct maptype 
{ 
	int used; 
	int index; 
	maptype* forwp; 
}; 
struct memtype 
{ 
	int used; 
	int index; 
	memtype* forwp; 
}; 
class CMos_stor   
{ 
public: 
	maptype* DSTRA;//自由块链尾指针 
	maptype* DSPTR;//自由块链首指针 
	int DSFRC;//自由块总块数 
	memtype* MEMTRA;//自由页链尾指针 
	memtype* MEMPTR;//自由页链首指针 
	int MEMFRC;//自由页总页数 
	memtype MEMTB[30]; 
	maptype DSKMTB[100]; 
 
	void dsk_free(int m,maptype *a); 
	bool dsk_allocation(int m,maptype* &t); 
	void mem_free(int m,memtype *ptr); 
	bool mem_allocation(int m,memtype *&ret); 
	CMos_stor(); 
	virtual ~CMos_stor(); 
private: 
	CMos_UI m_UI; 
}; 
 
#endif // !defined(AFX_MOS_STOR_H__8B275FA6_B9EE_44BF_8707_3819D0561BCD__INCLUDED_)