1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:27:43 +00:00

Kernel: Remove unused used/free pages API's from PhysicalRegion

This commit is contained in:
Andreas Kling 2021-07-13 17:44:03 +02:00
parent be90e51355
commit 6ea5db20ff
3 changed files with 0 additions and 9 deletions

View file

@ -309,10 +309,6 @@ extern "C" PageDirectoryEntry boot_pd3[1024];
UNMAP_AFTER_INIT void MemoryManager::initialize_physical_pages()
{
// No physical memory region should be using any memory yet!
for (auto& region : m_user_physical_regions)
VERIFY(region.used() == 0);
// We assume that the physical page range is contiguous and doesn't contain huge gaps!
PhysicalAddress highest_physical_address;
for (auto& range : m_used_memory_ranges) {

View file

@ -73,7 +73,6 @@ unsigned PhysicalRegion::finalize_capacity()
OwnPtr<PhysicalRegion> PhysicalRegion::try_take_pages_from_beginning(unsigned page_count)
{
VERIFY(m_used == 0);
VERIFY(page_count > 0);
VERIFY(page_count < m_pages);
auto taken_lower = m_lower;

View file

@ -32,8 +32,6 @@ public:
PhysicalAddress lower() const { return m_lower; }
PhysicalAddress upper() const { return m_upper; }
unsigned size() const { return m_pages; }
unsigned used() const { return m_used; }
unsigned free() const { return m_pages - m_used; }
bool contains(PhysicalAddress paddr) const { return paddr >= m_lower && paddr <= m_upper; }
OwnPtr<PhysicalRegion> try_take_pages_from_beginning(unsigned);
@ -47,8 +45,6 @@ private:
NonnullOwnPtrVector<PhysicalZone> m_zones;
size_t m_used { 0 };
PhysicalAddress m_lower;
PhysicalAddress m_upper;
unsigned m_pages { 0 };