00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __TOYSWAP_H__
00010 #define __TOYSWAP_H__
00011
00012 #ifdef __cplusplus
00013 extern "C" {
00014 #endif
00015
00022 #define SWAP_OUT_PREFIX "------> "
00023
00024 #define SWAP_IN_PREFIX "<------ "
00025
00026 #define SWAP_CMD_STR "Page %d of process %d paged "
00027
00028 #define SWAP_FILENAME "__ToySwap.dat"
00029
00030 #define SWAP_STRING "ToyMem Swap File v0.0.4"
00031
00032 #define SWAP_STRINGSIZE 32
00033
00034 #define SWAP_OFFSET 0x0100
00035
00036 typedef struct ToySwapHeader
00037 {
00038 char FileStr[SWAP_STRINGSIZE];
00039 unsigned long Version;
00040 int MemSize;
00041 int PageSize;
00042 int CurrentPage;
00043 } ToySwapHeader;
00044
00046 int TMM_SwapCreate(ToyMM *tmm);
00048 int TMM_SwapDestroy(ToyMM *tmm);
00049
00051 int TMM_SwapIn(ToyMM *tmm, int process, int page, int frame);
00053 int TMM_SwapOut(ToyMM *tmm, int process, int page);
00055 #ifdef __cplusplus
00056 }
00057 #endif
00058
00059 #endif