
 PROCEDURE [INLINE] mmp$maintain_memory_thresholds;

{     The purpose of this procedure is to check the memory thresholds
{  concerning the status of jobs being swapped.  If memory is needed
{  swapped jobs that have not had swapout IO initiated are advanced.

    VAR
      available_memory: mmt$page_frame_index,
      pages_flushed: mmt$page_frame_index;

    available_memory := mmv$reassignable_page_frames.now + mmv$reassignable_page_frames.soon;

    IF (available_memory <= jmv$long_wait_swap_threshold [jmc$lowest_dispatching_priority]) AND
          (mmv$reassignable_page_frames.swapout_io_not_initiated <> 0) THEN
      jsp$initiate_swapout_io (pages_flushed);
    IFEND;

  PROCEND mmp$maintain_memory_thresholds;

?? PUSH (LISTEXT := ON) ??
*copyc jsp$initiate_swapout_io
*copyc jmv$long_wait_swap_threshold
?? POP ??
