summaryrefslogtreecommitdiff
path: root/vm/vm_resident.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm/vm_resident.c')
-rw-r--r--vm/vm_resident.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/vm_resident.c b/vm/vm_resident.c
index 58d9827..f9441ad 100644
--- a/vm/vm_resident.c
+++ b/vm/vm_resident.c
@@ -1212,7 +1212,8 @@ void vm_page_wait(
*/
simple_lock(&vm_page_queue_free_lock);
- if (vm_page_free_count < vm_page_free_target) {
+ if ((vm_page_free_count < vm_page_free_target)
+ || (vm_page_external_count > vm_page_external_limit)) {
if (vm_page_free_wanted++ == 0)
thread_wakeup((event_t)&vm_page_free_wanted);
assert_wait((event_t)&vm_page_free_count, FALSE);