mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 17:15:08 +00:00
Kernel: Remove unnecessary counting of VMObject-attached Regions
VMObject already has an IntrusiveList of all the Regions that map it. We were keeping a counter in addition to this, and only using it in a single place to avoid iterating over the list in case it only had 1 entry. Simplify VMObject by removing this counter and always iterating the list even if there's only 1 entry. :^)
This commit is contained in:
parent
ae3778c303
commit
0d963fd641
3 changed files with 5 additions and 16 deletions
|
@ -31,7 +31,7 @@ VMObject::~VMObject()
|
|||
}
|
||||
|
||||
MM.unregister_vmobject(*this);
|
||||
VERIFY(m_regions_count.load(AK::MemoryOrder::memory_order_relaxed) == 0);
|
||||
VERIFY(m_regions.is_empty());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue