mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user