diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-01 11:38:59 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-01 11:40:40 +0200 |
commit | c58d1868cbe9b9b2d17026f66ed7ee9c3fe90450 (patch) | |
tree | f97a58acadac35f38a1a6c9e3bc8d74b1e527ed7 /Kernel/VM/Region.h | |
parent | 4bfd4dc6c7c50524f2c6382692cf599e1c62b94e (diff) | |
download | serenity-c58d1868cbe9b9b2d17026f66ed7ee9c3fe90450.zip |
Kernel: Fix munmap() bad splitting of already-split Regions
When splitting an Region that's already the result of an earlier split,
we have to take the Region's offset-in-VMObject into account since it
may be non-zero.
Diffstat (limited to 'Kernel/VM/Region.h')
-rw-r--r-- | Kernel/VM/Region.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/VM/Region.h b/Kernel/VM/Region.h index 16c12d5c13..8ee5600e4d 100644 --- a/Kernel/VM/Region.h +++ b/Kernel/VM/Region.h @@ -79,6 +79,11 @@ public: return size() / PAGE_SIZE; } + size_t offset_in_vmobject() const + { + return m_offset_in_vmo; + } + int commit(); size_t amount_resident() const; |