mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
Kernel: Simplify VMObject::is_anonymous().
This doesn't need a separate flag. A VMObject is always anonymous if it has no backing inode.
This commit is contained in:
parent
b8e60b6652
commit
34c5db61aa
2 changed files with 4 additions and 8 deletions
|
@ -22,7 +22,7 @@ public:
|
|||
Retained<VMObject> clone();
|
||||
|
||||
~VMObject();
|
||||
bool is_anonymous() const { return m_anonymous; }
|
||||
bool is_anonymous() const { return !m_inode; }
|
||||
|
||||
Inode* inode() { return m_inode.ptr(); }
|
||||
const Inode* inode() const { return m_inode.ptr(); }
|
||||
|
@ -49,10 +49,9 @@ private:
|
|||
template<typename Callback> void for_each_region(Callback);
|
||||
|
||||
String m_name;
|
||||
bool m_anonymous { false };
|
||||
bool m_allow_cpu_caching { true };
|
||||
off_t m_inode_offset { 0 };
|
||||
size_t m_size { 0 };
|
||||
bool m_allow_cpu_caching { true };
|
||||
RetainPtr<Inode> m_inode;
|
||||
Vector<RetainPtr<PhysicalPage>> m_physical_pages;
|
||||
Lock m_paging_lock { "VMObject" };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue