vm_object.c (19c244d0640c2ed3d6da0c746a3c0873e5df7c94) | vm_object.c (222d01951f8677015e3e96c6950e809c0d983c09) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 641 unchanged lines hidden (view full) --- 650 */ 651 vm_page_lock_queues(); 652 while ((p = TAILQ_FIRST(&object->memq)) != NULL) { 653 KASSERT(!p->busy && (p->oflags & VPO_BUSY) == 0, 654 ("vm_object_terminate: freeing busy page %p " 655 "p->busy = %d, p->flags %x\n", p, p->busy, p->flags)); 656 if (p->wire_count == 0) { 657 vm_page_free(p); | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 641 unchanged lines hidden (view full) --- 650 */ 651 vm_page_lock_queues(); 652 while ((p = TAILQ_FIRST(&object->memq)) != NULL) { 653 KASSERT(!p->busy && (p->oflags & VPO_BUSY) == 0, 654 ("vm_object_terminate: freeing busy page %p " 655 "p->busy = %d, p->flags %x\n", p, p->busy, p->flags)); 656 if (p->wire_count == 0) { 657 vm_page_free(p); |
658 cnt.v_pfree++; | 658 VMCNT_ADD(pfree, 1); |
659 } else { 660 vm_page_remove(p); 661 } 662 } 663 vm_page_unlock_queues(); 664 665 /* 666 * Let the pager know object is dead. --- 1544 unchanged lines hidden --- | 659 } else { 660 vm_page_remove(p); 661 } 662 } 663 vm_page_unlock_queues(); 664 665 /* 666 * Let the pager know object is dead. --- 1544 unchanged lines hidden --- |