Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields  

Toy Memory Swap Manager
[Toy Memory Page Manager]


Data Structures

struct  ToySwapHeader

Defines

#define SWAP_OUT_PREFIX   "------> "
 String prefixed to swap-out notifications.

#define SWAP_IN_PREFIX   "<------ "
 String prefixed to swap-in notifications.

#define SWAP_CMD_STR   "Page %d of process %d paged "
 printf command-string for swap notification

#define SWAP_FILENAME   "__ToySwap.dat"
 Default name of swapfile.

#define SWAP_STRING   "ToyMem Swap File v0.0.4"
 String at start of swap file.

#define SWAP_STRINGSIZE   32
 Maxmimum size of string at start of swap file.

#define SWAP_OFFSET   0x0100
 Swap area of file begins at 0x0100.


Typedefs

typedef ToySwapHeader ToySwapHeader

Functions

int TMM_SwapCreate (ToyMM *tmm)
 Creates a new ToySwapFile and assigns it to tmm.

int TMM_SwapDestroy (ToyMM *tmm)
 Closes and deletes the swap file.

int TMM_SwapIn (ToyMM *tmm, int process, int page, int frame)
 Swaps in specified page from disk, using empty page 'frame'.

int TMM_SwapOut (ToyMM *tmm, int process, int page)
 Swaps out specified page to disk.


Define Documentation

#define SWAP_CMD_STR   "Page %d of process %d paged "
 

printf command-string for swap notification

Definition at line 26 of file ToySwap.h.

#define SWAP_FILENAME   "__ToySwap.dat"
 

Default name of swapfile.

Definition at line 28 of file ToySwap.h.

#define SWAP_IN_PREFIX   "<------ "
 

String prefixed to swap-in notifications.

Definition at line 24 of file ToySwap.h.

#define SWAP_OFFSET   0x0100
 

Swap area of file begins at 0x0100.

Definition at line 34 of file ToySwap.h.

#define SWAP_OUT_PREFIX   "------> "
 

String prefixed to swap-out notifications.

Definition at line 22 of file ToySwap.h.

#define SWAP_STRING   "ToyMem Swap File v0.0.4"
 

String at start of swap file.

Definition at line 30 of file ToySwap.h.

#define SWAP_STRINGSIZE   32
 

Maxmimum size of string at start of swap file.

Definition at line 32 of file ToySwap.h.


Function Documentation

int TMM_SwapCreate ToyMM   tmm
 

Creates a new ToySwapFile and assigns it to tmm.

Definition at line 235 of file ToySwap.c.

References MAX_PROCESSES, ToyMM::memSize, ToyMM::swap, TMM_PagingEnabled(), TMM_SwapDestroy(), and ToyMem::type.

Referenced by TMM_EnablePaging().

int TMM_SwapDestroy ToyMM   tmm
 

Closes and deletes the swap file.

Definition at line 185 of file ToySwap.c.

References ToyMM::swap.

Referenced by TMM_Free(), and TMM_SwapCreate().

int TMM_SwapIn ToyMM   tmm,
int    process,
int    page,
int    frame
 

Swaps in specified page from disk, using empty page 'frame'.

Definition at line 46 of file ToySwap.c.

References TMM_AssignFrame(), TMM_FrameFree(), TMM_FreeFrame(), TMM_PageSwappedIn(), TMM_PageSwappedOut(), and ToyMM::watchPaging.

Referenced by TMM_GetRealAddress().

int TMM_SwapOut ToyMM   tmm,
int    process,
int    page
 

Swaps out specified page to disk.

Definition at line 74 of file ToySwap.c.

References TMM_FreeFrame(), TMM_MarkPageSwappedOut(), TMM_PageFree(), TMM_PageSwappedOut(), and ToyMM::watchPaging.

Referenced by TMM_FindFreeFrame().


Generated on Fri Apr 4 14:29:08 2003 for ToyMem by doxygen1.3-rc3