VMCache::Resize(): When shrinking the cache unmap the pages we're removing.

Theoretically, not doing that could have caused still mapped pages to get
into the free queue. This could have been a cause of #3110, but the reported
circumstances don't look quite fitting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30605 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-05-03 12:32:20 +00:00
parent 84e3197428
commit 88b29adcbd
+4
View File
@@ -789,6 +789,10 @@ VMCache::Resize(off_t newSize)
}
// remove the page and put it into the free queue
vm_remove_all_page_mappings(page, NULL);
ASSERT(page->wired_count == 0);
// TODO: Find a real solution! Unmapping is probably fine, but
// we have no way of unmapping wired pages here.
RemovePage(page);
vm_page_free(this, page);
// Note: When iterating through a IteratableSplayTree