From 88b29adcbd7ce2c8a535756a5286fdd2fc5b70a3 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 3 May 2009 12:32:20 +0000 Subject: [PATCH] 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 --- src/system/kernel/vm/vm_cache.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/system/kernel/vm/vm_cache.cpp b/src/system/kernel/vm/vm_cache.cpp index 5543567d05..23e2bf3dfe 100644 --- a/src/system/kernel/vm/vm_cache.cpp +++ b/src/system/kernel/vm/vm_cache.cpp @@ -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