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

Kernel: Remove PhysicalRegion::finalize_capacity()

There's no reason to delay calculating the capacity (total page count)
of each PhysicalRegion. Just do it in the constructor.
This commit is contained in:
Andreas Kling 2021-07-13 18:46:09 +02:00
parent 5171249540
commit 959ceb4424
3 changed files with 5 additions and 19 deletions

View file

@ -282,10 +282,10 @@ UNMAP_AFTER_INIT void MemoryManager::parse_memory_map()
.release_nonnull());
for (auto& region : m_super_physical_regions)
m_system_memory_info.super_physical_pages += region.finalize_capacity();
m_system_memory_info.super_physical_pages += region.size();
for (auto& region : m_user_physical_regions)
m_system_memory_info.user_physical_pages += region.finalize_capacity();
m_system_memory_info.user_physical_pages += region.size();
register_reserved_ranges();
for (auto& range : m_reserved_memory_ranges) {