浏览代码

Kernel: Remove unused variable PhysicalRegion::m_last

Andreas Kling 4 年之前
父节点
当前提交
cc5403f77b
共有 2 个文件被更改,包括 0 次插入5 次删除
  1. 0 4
      Kernel/VM/PhysicalRegion.cpp
  2. 0 1
      Kernel/VM/PhysicalRegion.h

+ 0 - 4
Kernel/VM/PhysicalRegion.cpp

@@ -102,7 +102,6 @@ Optional<unsigned> PhysicalRegion::find_and_allocate_contiguous_range(size_t cou
             m_bitmap.set(page_index, true);
             m_bitmap.set(page_index, true);
         }
         }
         m_used += count;
         m_used += count;
-        m_last = page + count;
         return page;
         return page;
     }
     }
     return {};
     return {};
@@ -131,9 +130,6 @@ void PhysicalRegion::return_page_at(PhysicalAddress addr)
     ASSERT((FlatPtr)local_offset < (FlatPtr)(m_pages * PAGE_SIZE));
     ASSERT((FlatPtr)local_offset < (FlatPtr)(m_pages * PAGE_SIZE));
 
 
     auto page = (FlatPtr)local_offset / PAGE_SIZE;
     auto page = (FlatPtr)local_offset / PAGE_SIZE;
-    if (page < m_last)
-        m_last = page;
-
     m_bitmap.set(page, false);
     m_bitmap.set(page, false);
     m_used--;
     m_used--;
 }
 }

+ 0 - 1
Kernel/VM/PhysicalRegion.h

@@ -66,7 +66,6 @@ private:
     PhysicalAddress m_upper;
     PhysicalAddress m_upper;
     unsigned m_pages { 0 };
     unsigned m_pages { 0 };
     unsigned m_used { 0 };
     unsigned m_used { 0 };
-    unsigned m_last { 0 };
     Bitmap m_bitmap;
     Bitmap m_bitmap;
 };
 };