mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 18:08:12 +00:00
Kernel: Use a FixedArray for VMObject::m_physical_pages
This makes VMObject 8 bytes smaller since we can use the array size as the page count. The size() is now also computed from the page count instead of being a separate value. This makes sizes always be a multiple of PAGE_SIZE, which is sane.
This commit is contained in:
parent
5096eaa845
commit
b67200dfea
5 changed files with 19 additions and 39 deletions
|
@ -315,7 +315,7 @@ Optional<KBuffer> procfs$pid_vmo(InodeIdentifier identifier)
|
|||
region.vmo().is_anonymous() ? "anonymous" : "file-backed",
|
||||
®ion.vmo(),
|
||||
region.vmo().ref_count());
|
||||
for (int i = 0; i < region.vmo().page_count(); ++i) {
|
||||
for (size_t i = 0; i < region.vmo().page_count(); ++i) {
|
||||
auto& physical_page = region.vmo().physical_pages()[i];
|
||||
builder.appendf("P%x%s(%u) ",
|
||||
physical_page ? physical_page->paddr().get() : 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue