Kernel: Remove unused Region::translate_vmobject_page_range()
This commit is contained in:
parent
57417a3d6e
commit
559ab00249
Notes:
sideshowbarker
2024-07-18 08:03:22 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/559ab00249a
1 changed files with 0 additions and 22 deletions
|
@ -125,28 +125,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool translate_vmobject_page_range(size_t& index, size_t& page_count) const
|
||||
{
|
||||
auto first_index = first_page_index();
|
||||
if (index < first_index) {
|
||||
auto delta = first_index - index;
|
||||
index = first_index;
|
||||
if (delta >= page_count) {
|
||||
page_count = 0;
|
||||
return false;
|
||||
}
|
||||
page_count -= delta;
|
||||
}
|
||||
index -= first_index;
|
||||
auto total_page_count = this->page_count();
|
||||
if (index + page_count > total_page_count) {
|
||||
page_count = total_page_count - index;
|
||||
if (page_count == 0)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE size_t translate_to_vmobject_page(size_t page_index) const
|
||||
{
|
||||
return first_page_index() + page_index;
|
||||
|
|
Loading…
Add table
Reference in a new issue