diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-17 04:32:08 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-17 04:32:08 +0200 |
commit | 87b54a82c77bf811e9e9497cfb6037ac1a8ecde3 (patch) | |
tree | aaf85c74c3ef8b11b89a7c8426688bfadf5a8472 /Kernel/Process.cpp | |
parent | 4a6fcfbacf45a52af8b5073d628155de6ff16584 (diff) | |
download | serenity-87b54a82c77bf811e9e9497cfb6037ac1a8ecde3.zip |
Kernel: Let Region keep a Range internally.
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index bb1f0caee0..0275cc83c5 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -79,7 +79,7 @@ Region* Process::allocate_region(LinearAddress laddr, size_t size, String&& name else range = m_range_allocator.allocate_specific(laddr, size); - m_regions.append(adopt(*new Region(range.base(), range.size(), move(name), is_readable, is_writable))); + m_regions.append(adopt(*new Region(range, move(name), is_readable, is_writable))); MM.map_region(*this, *m_regions.last()); if (commit) m_regions.last()->commit(); @@ -97,7 +97,7 @@ Region* Process::allocate_file_backed_region(LinearAddress laddr, size_t size, R else range = m_range_allocator.allocate_specific(laddr, size); - m_regions.append(adopt(*new Region(range.base(), range.size(), move(inode), move(name), is_readable, is_writable))); + m_regions.append(adopt(*new Region(range, move(inode), move(name), is_readable, is_writable))); MM.map_region(*this, *m_regions.last()); return m_regions.last().ptr(); } @@ -115,7 +115,7 @@ Region* Process::allocate_region_with_vmo(LinearAddress laddr, size_t size, Reta offset_in_vmo &= PAGE_MASK; size = ceil_div(size, PAGE_SIZE) * PAGE_SIZE; - m_regions.append(adopt(*new Region(range.base(), range.size(), move(vmo), offset_in_vmo, move(name), is_readable, is_writable))); + m_regions.append(adopt(*new Region(range, move(vmo), offset_in_vmo, move(name), is_readable, is_writable))); MM.map_region(*this, *m_regions.last()); return m_regions.last().ptr(); } |