home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilst / virtual / !Virtual / h / pager < prev    next >
Encoding:
Text File  |  1993-06-23  |  1.3 KB  |  43 lines

  1. typedef struct range { int start,end; } RANGE;
  2.  
  3. /* All of these must be called in normal, svc mode */
  4.  
  5. /* initialise */
  6. void Initourmem(WKSP *w);
  7. /* reread which pages we have after Wimp may have changed them */
  8. void FindPages(WKSP *w);
  9. /* Call wimp to set slot size */
  10. void SetRealMem(WKSP *w, int size);
  11. /* Set up memmap to match slot from wimp */
  12. void SetWimpMemMap(WKSP *w);
  13. /* Resize pagefile for virtual slot, return size actually got */
  14. int SetVirtualSlot(WKSP *w, int size);
  15. /* terminate */
  16. void Finishourmem(WKSP *w);
  17.  
  18. /* switch to/from virtual mem map */
  19. void virtualmem(WKSP *w);
  20. void normalmem(WKSP *w);
  21.  
  22. /* All these return 0 indicating failed. The first 3 work on any memory area. */
  23.  
  24. /* Find physical image of r or some initial section of it, and return that *
  25.  * Locate can return pagefile offset|(1<<31),
  26.  * while Physical will page it it in */
  27. RANGE Locate(WKSP *w, int start, int end);
  28. RANGE Physical(WKSP *w, int start, int end);
  29.  
  30. /* Read and write blocks of virtual memory */
  31. int ToMem(WKSP *w, void *src, int dest, int size);
  32. int FromMem(WKSP *w, int src, void *dest, int size);
  33.  
  34. /* Ensure mapped in - call in virtual, svc mode */
  35. int ReadRange(WKSP *w, int start, int end);
  36. int WriteRange(WKSP *w, int start, int end);
  37. int ReadPtr(WKSP *w, int start);
  38. int WritePtr(WKSP *w, int start);
  39.  
  40. #ifdef FIXED_SYSTEMCALL_VERSION_FO
  41. void FixMemoryPages(WKSP *w);
  42. #endif
  43.