[haiku-commits] r36229 - haiku/trunk/src/system/kernel/vm

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 13 Apr 2010 19:34:32 +0200 (CEST)

Author: bonefish
Date: 2010-04-13 19:34:32 +0200 (Tue, 13 Apr 2010)
New Revision: 36229
Changeset: http://dev.haiku-os.org/changeset/36229/haiku

Modified:
   haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp
Log:
Missed that one in r36228: DebugHasPage() implementation.


Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp
===================================================================
--- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp       2010-04-13 
17:18:57 UTC (rev 36228)
+++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp       2010-04-13 
17:34:32 UTC (rev 36229)
@@ -494,6 +494,19 @@
 }
 
 
+bool
+VMAnonymousCache::DebugHasPage(off_t offset)
+{
+       page_num_t pageIndex = offset >> PAGE_SHIFT;
+       swap_hash_key key = { this, pageIndex };
+       swap_block* swap = sSwapHashTable.Lookup(key);
+       if (swap == NULL)
+               return false;
+
+       return swap->swap_slots[pageIndex & SWAP_BLOCK_MASK] != SWAP_SLOT_NONE;
+}
+
+
 status_t
 VMAnonymousCache::Read(off_t offset, const iovec* vecs, size_t count,
        uint32 flags, size_t* _numBytes)


Other related posts:

  • » [haiku-commits] r36229 - haiku/trunk/src/system/kernel/vm - ingo_weinhold