1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07:35 +00:00

Kernel: Add some InodeVMObject type assertions in Region::clone()

Let's make sure that we're never cloning shared inode-backed objects
as if they were private, and vice versa.
This commit is contained in:
Andreas Kling 2020-03-01 11:08:28 +01:00
parent 88b334135b
commit 48bbfe51fb
4 changed files with 12 additions and 0 deletions

View file

@ -52,6 +52,8 @@ public:
virtual bool is_anonymous() const { return false; }
virtual bool is_purgeable() const { return false; }
virtual bool is_inode() const { return false; }
virtual bool is_shared_inode() const { return false; }
virtual bool is_private_inode() const { return false; }
size_t page_count() const { return m_physical_pages.size(); }
const FixedArray<RefPtr<PhysicalPage>>& physical_pages() const { return m_physical_pages; }