mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +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
|
@ -33,7 +33,6 @@ Retained<VMObject> VMObject::clone()
|
|||
|
||||
VMObject::VMObject(VMObject& other)
|
||||
: m_name(other.m_name)
|
||||
, m_anonymous(other.m_anonymous)
|
||||
, m_inode_offset(other.m_inode_offset)
|
||||
, m_size(other.m_size)
|
||||
, m_inode(other.m_inode)
|
||||
|
@ -43,16 +42,14 @@ VMObject::VMObject(VMObject& other)
|
|||
}
|
||||
|
||||
VMObject::VMObject(size_t size)
|
||||
: m_anonymous(true)
|
||||
, m_size(size)
|
||||
: m_size(size)
|
||||
{
|
||||
MM.register_vmo(*this);
|
||||
m_physical_pages.resize(page_count());
|
||||
}
|
||||
|
||||
VMObject::VMObject(PhysicalAddress paddr, size_t size)
|
||||
: m_anonymous(true)
|
||||
, m_size(size)
|
||||
: m_size(size)
|
||||
{
|
||||
MM.register_vmo(*this);
|
||||
for (size_t i = 0; i < size; i += PAGE_SIZE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue