diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-14 17:31:57 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-14 17:31:57 +0200 |
commit | 01ffcdfa31ba560fcceee82ba2158f867ad114ec (patch) | |
tree | 04b38055a947a1e98c1e9c338297ca945232af85 /Kernel/VM/Region.cpp | |
parent | 2fa5e2b66b622797ae3dce4fc989d95b74e5d0d7 (diff) | |
download | serenity-01ffcdfa31ba560fcceee82ba2158f867ad114ec.zip |
Kernel: Encapsulate the Region's COW map a bit better.
Diffstat (limited to 'Kernel/VM/Region.cpp')
-rw-r--r-- | Kernel/VM/Region.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/VM/Region.cpp b/Kernel/VM/Region.cpp index 1f01b0b33d..27b0d5ebff 100644 --- a/Kernel/VM/Region.cpp +++ b/Kernel/VM/Region.cpp @@ -94,8 +94,7 @@ Retained<Region> Region::clone() laddr().get()); #endif // Set up a COW region. The parent (this) region becomes COW as well! - for (size_t i = 0; i < page_count(); ++i) - m_cow_map.set(i, true); + m_cow_map.fill(true); MM.remap_region(current->process().page_directory(), *this); return adopt(*new Region(laddr(), size(), m_vmo->clone(), m_offset_in_vmo, String(m_name), m_readable, m_writable, true)); } |