* SWP_SIZECHECK() - update swap_pager_full indication * * update the swap_pager_almost_full indication and warn when we are * about to run out of swap space, using lowat/hiwat hysteresis. * * Clear swap_pager_full ( task killing ) indication when lowat is met. * * No restrictions on call * This routine may not block. */
| 531 | * This routine may not block. |
| 532 | */ |
| 533 | static void |
| 534 | swp_sizecheck(void) |
| 535 | { |
| 536 | |
| 537 | if (swap_pager_avail < nswap_lowat) { |
| 538 | if (swap_pager_almost_full == 0) { |
| 539 | printf("swap_pager: out of swap space\n"); |
| 540 | swap_pager_almost_full = 1; |
| 541 | } |
| 542 | } else { |
| 543 | swap_pager_full = 0; |
| 544 | if (swap_pager_avail > nswap_hiwat) |
| 545 | swap_pager_almost_full = 0; |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | /* |
| 550 | * SWAP_PAGER_INIT() - initialize the swap pager! |
no test coverage detected