* My last change to vm_page.cpp made an existing bug much more likely to

appear: when freeing a modified page, it wouldn't have a cache
  anymore, but set_page_state_nolock() depended on it.
* To work around this, I added a vm_page_free() function, which the
  caches that free modified pages have to call (but others may, too).
  It will correctly maintain the sModifiedTemporaryPages counter in case
  the cache has already been removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23318 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-01-09 18:15:28 +00:00
parent e3145a8d8d
commit bcb71f00e8
3 changed files with 28 additions and 7 deletions
+1
View File
@@ -26,6 +26,7 @@ status_t vm_page_init_post_thread(struct kernel_args *args);
status_t vm_mark_page_inuse(addr_t page);
status_t vm_mark_page_range_inuse(addr_t startPage, addr_t length);
void vm_page_free(struct vm_cache *cache, struct vm_page *page);
status_t vm_page_set_state(struct vm_page *page, int state);
void vm_page_requeue(struct vm_page *page, bool tail);