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:
parent
be90e51355
commit
6ea5db20ff
3 changed files with 0 additions and 9 deletions
|
@ -309,10 +309,6 @@ extern "C" PageDirectoryEntry boot_pd3[1024];
|
||||||
|
|
||||||
UNMAP_AFTER_INIT void MemoryManager::initialize_physical_pages()
|
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!
|
// We assume that the physical page range is contiguous and doesn't contain huge gaps!
|
||||||
PhysicalAddress highest_physical_address;
|
PhysicalAddress highest_physical_address;
|
||||||
for (auto& range : m_used_memory_ranges) {
|
for (auto& range : m_used_memory_ranges) {
|
||||||
|
|
|
@ -73,7 +73,6 @@ unsigned PhysicalRegion::finalize_capacity()
|
||||||
|
|
||||||
OwnPtr<PhysicalRegion> PhysicalRegion::try_take_pages_from_beginning(unsigned page_count)
|
OwnPtr<PhysicalRegion> PhysicalRegion::try_take_pages_from_beginning(unsigned page_count)
|
||||||
{
|
{
|
||||||
VERIFY(m_used == 0);
|
|
||||||
VERIFY(page_count > 0);
|
VERIFY(page_count > 0);
|
||||||
VERIFY(page_count < m_pages);
|
VERIFY(page_count < m_pages);
|
||||||
auto taken_lower = m_lower;
|
auto taken_lower = m_lower;
|
||||||
|
|
|
@ -32,8 +32,6 @@ public:
|
||||||
PhysicalAddress lower() const { return m_lower; }
|
PhysicalAddress lower() const { return m_lower; }
|
||||||
PhysicalAddress upper() const { return m_upper; }
|
PhysicalAddress upper() const { return m_upper; }
|
||||||
unsigned size() const { return m_pages; }
|
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; }
|
bool contains(PhysicalAddress paddr) const { return paddr >= m_lower && paddr <= m_upper; }
|
||||||
|
|
||||||
OwnPtr<PhysicalRegion> try_take_pages_from_beginning(unsigned);
|
OwnPtr<PhysicalRegion> try_take_pages_from_beginning(unsigned);
|
||||||
|
@ -47,8 +45,6 @@ private:
|
||||||
|
|
||||||
NonnullOwnPtrVector<PhysicalZone> m_zones;
|
NonnullOwnPtrVector<PhysicalZone> m_zones;
|
||||||
|
|
||||||
size_t m_used { 0 };
|
|
||||||
|
|
||||||
PhysicalAddress m_lower;
|
PhysicalAddress m_lower;
|
||||||
PhysicalAddress m_upper;
|
PhysicalAddress m_upper;
|
||||||
unsigned m_pages { 0 };
|
unsigned m_pages { 0 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue