mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Kernel+SystemMonitor: Expose the number of set CoW bits in each Region
This number tells us how many more pages in a given region will trigger a CoW fault if written to.
This commit is contained in:
parent
9ad151c665
commit
3fbc50a350
4 changed files with 14 additions and 0 deletions
|
@ -113,6 +113,16 @@ int Region::commit()
|
|||
return 0;
|
||||
}
|
||||
|
||||
u32 Region::cow_pages() const
|
||||
{
|
||||
if (!m_cow_map)
|
||||
return 0;
|
||||
u32 count = 0;
|
||||
for (int i = 0; i < m_cow_map->size(); ++i)
|
||||
count += m_cow_map->get(i);
|
||||
return count;
|
||||
}
|
||||
|
||||
size_t Region::amount_resident() const
|
||||
{
|
||||
size_t bytes = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue