home *** CD-ROM | disk | FTP | other *** search
- /*
- * pager.h
- * Part of the !Virtual distribution
- * (c) bdb/nas/fo, 1992-3
- */
-
- typedef struct range { int start,end; } RANGE;
-
- /* All of these must be called in normal, svc mode */
-
- /* initialise */
- void Initourmem(WKSP *w);
- /* reread which pages we have after Wimp may have changed them */
- void FindPages(WKSP *w);
- /* Call wimp to set slot size */
- void SetRealMem(WKSP *w, int size);
- /* Set up memmap to match slot from wimp */
- void SetWimpMemMap(WKSP *w);
- /* Resize pagefile for virtual slot, return size actually got */
- int SetVirtualSlot(WKSP *w, int size);
- /* terminate */
- void Finishourmem(WKSP *w);
-
- /* switch to/from virtual mem map */
- void virtualmem(WKSP *w);
- void normalmem(WKSP *w);
-
- /* All these return 0 indicating failed. The first 3 work on any memory area. */
-
- /* Find physical image of r or some initial section of it, and return that *
- * Locate can return pagefile offset|(1<<31),
- * while Physical will page it it in */
- RANGE Locate(WKSP *w, int start, int end);
- RANGE Physical(WKSP *w, int start, int end);
-
- /* Read and write blocks of virtual memory */
- int ToMem(WKSP *w, void *src, int dest, int size);
- int FromMem(WKSP *w, int src, void *dest, int size);
-
- /* Ensure mapped in - call in virtual, svc mode */
- int ReadRange(WKSP *w, int start, int end);
- int WriteRange(WKSP *w, int start, int end);
- int ReadPtr(WKSP *w, int start);
- int WritePtr(WKSP *w, int start);
-
- void FixMemoryPages(WKSP *w);
-