Kernel: Add physical memory info to /proc/{pid}/meminfo
This commit is contained in:
@@ -85,7 +85,7 @@ namespace Kernel
|
||||
}
|
||||
}
|
||||
|
||||
BAN::ErrorOr<bool> FileBackedRegion::allocate_page_containing(vaddr_t address)
|
||||
BAN::ErrorOr<bool> FileBackedRegion::allocate_page_containing_impl(vaddr_t address)
|
||||
{
|
||||
ASSERT(contains(address));
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Kernel
|
||||
}
|
||||
}
|
||||
|
||||
BAN::ErrorOr<bool> MemoryBackedRegion::allocate_page_containing(vaddr_t address)
|
||||
BAN::ErrorOr<bool> MemoryBackedRegion::allocate_page_containing_impl(vaddr_t address)
|
||||
{
|
||||
ASSERT(m_type == Type::PRIVATE);
|
||||
|
||||
|
||||
@@ -47,4 +47,12 @@ namespace Kernel
|
||||
return true;
|
||||
}
|
||||
|
||||
BAN::ErrorOr<bool> MemoryRegion::allocate_page_containing(vaddr_t address)
|
||||
{
|
||||
auto ret = allocate_page_containing_impl(address);
|
||||
if (!ret.is_error() && ret.value())
|
||||
m_physical_page_count++;
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user