home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / misc / VMM_src.lha / VMM / replacement.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-08  |  1.5 KB  |  66 lines

  1. #include <exec/types.h>
  2. #include "defs.h"
  3.  
  4. static char rcsid [] = "$Id: replacement.c,v 3.1 95/03/08 19:52:13 Martin_Apel Rel $";
  5.  
  6. /*******************************************************************/
  7.  
  8. int InitReplacementAlgorithm (void)
  9.  
  10. {
  11. /* Initialize the data structure used by the page replacement algorithm */
  12. }
  13.  
  14. /*******************************************************************/
  15.  
  16. PRIVATE BOOL TablePagingAllowed (struct FrameDescr *table_frame)
  17.  
  18. {
  19. ULONG *cur_descr;
  20. int i;
  21.  
  22. cur_descr = (ULONG*) table_frame->PhysAddr;
  23. for (i = 0; i < PAGESIZE / sizeof (ULONG); i++, cur_descr++)
  24.   {
  25.   if (PAGE_RESIDENT_P (*cur_descr) || (STATE_FROM_DESCR (*cur_descr) == COMING_IN))
  26.     return (FALSE);
  27.   }
  28. return (TRUE);
  29. }
  30.  
  31. /*******************************************************************/
  32.  
  33. struct FrameDescr *FindRemoveablePage (void)
  34.  
  35. {
  36. /* Finds a page to be evicted specified by the current page replacement
  37.  * algorithm. This page is already removed from the list.
  38.  */
  39. }
  40.  
  41. /*******************************************************************/
  42.  
  43. void ReuseSoon (struct FrameDescr *fd)
  44.  
  45. {
  46. /* Tells the page replacement algorithm to make this frame available soon. */
  47. }
  48.  
  49. /*******************************************************************/
  50.  
  51. void ReuseLate (struct FrameDescr *fd)
  52.  
  53. {
  54. /* Tells the page replacement algorithm to make this frame available
  55.  * as late as possible.
  56.  */
  57. }
  58.  
  59. /*******************************************************************/
  60.  
  61. void RemoveFromAvail (struct FrameDescr *fd)
  62.  
  63. {
  64. /* Removes the page from the list of available frames. */
  65. }
  66.