Update the pmap's resident page count when a page table page is freed in
pmap_remove_pde() and pmap_remove_pages(). MFC after: 6 weeks
This commit is contained in:
parent
72d28b3f41
commit
69680f169c
@ -2342,6 +2342,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva,
|
||||
mpte = pmap_lookup_pt_page(pmap, sva);
|
||||
if (mpte != NULL) {
|
||||
pmap_remove_pt_page(pmap, mpte);
|
||||
pmap->pm_stats.resident_count--;
|
||||
KASSERT(mpte->wire_count == NPTEPG,
|
||||
("pmap_remove_pde: pte page wire count error"));
|
||||
mpte->wire_count = 0;
|
||||
@ -3851,6 +3852,7 @@ pmap_remove_pages(pmap_t pmap)
|
||||
mpte = pmap_lookup_pt_page(pmap, pv->pv_va);
|
||||
if (mpte != NULL) {
|
||||
pmap_remove_pt_page(pmap, mpte);
|
||||
pmap->pm_stats.resident_count--;
|
||||
KASSERT(mpte->wire_count == NPTEPG,
|
||||
("pmap_remove_pages: pte page wire count error"));
|
||||
mpte->wire_count = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user