mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
Show the amount of memory in GraphicsBitmaps in /bin/top.
This seems like an extremely relevant metric to track.
This commit is contained in:
@@ -2201,6 +2201,16 @@ size_t Process::amount_virtual() const
|
||||
return amount;
|
||||
}
|
||||
|
||||
size_t Process::amount_in_bitmaps() const
|
||||
{
|
||||
size_t amount = 0;
|
||||
for (auto& region : m_regions) {
|
||||
if (region->is_bitmap())
|
||||
amount += region->size();
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
size_t Process::amount_resident() const
|
||||
{
|
||||
// FIXME: This will double count if multiple regions use the same physical page.
|
||||
|
||||
Reference in New Issue
Block a user