📄 mmu.hpp
字号:
//*************************************************************************// MODULE : MMU - Devide driver class for a memory manager *// AUTHOR : Ron Chernich *// PURPOSE: An RCOS Memory Management Unit device driver must respond to *// the messages and format in this module. The strategy of how *// this is implemented my vary with different boby code modules *// HISTORY: *// 22-APR-93 First version *// 17-MAR-95 Partitions uped to 16 from 8 for additional users *//*************************************************************************#ifndef _RCOS_MMU_ #include "rcos.hpp" #include "kernel.hpp" #include "message.hpp" #define PART_SIZE 1024 // fixed partition size (words) #define MAX_PARTS 16 // maxim number of partitions /////////////////// // MMU dependant page table structure .. very simple in this case // typedef struct pgtbl { UINT16 *pMem; // pointer to actual RAM BOOL bInUse; // flag set when allocated } PGTBL, *PPGTBL; //////////////////////// // This is the MMU "driver" (based as usual on the port class) // class Mmu : public port { UINT16 *pMemBlk; // memory block managed by driver PGTBL arrPgTbl[MAX_PARTS]; // array of pages in main memory HANDLE FindFree (PPGTBL); // get a free page handle public: Mmu (UINT16, UINT16, Knl*); // constructor ~Mmu (void); // destructir void RxPort (PMSG); // supply virtual member of "port" }; #define _RCOS_MMU_#endif/////////////////////////////////// eof ////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -