ProjectSerenity / firefly

[WIP] Firefly is a research OS inspired by Linux and Plan 9.
BSD 3-Clause "New" or "Revised" License
12 stars 0 forks source link

mem: Merge contiguous physical memory regions in `virt_to_phys_addrs` #10

Closed SlyMarbo closed 2 years ago

SlyMarbo commented 2 years ago

The virt_to_phys_addrs function translates a virtual memory region into one or more physical memory regions, based on a set of page mappings. At the moment, if the virtual memory region maps to two or more contiguous physical memory regions, we return the full sequence of physical regions. We could make things simpler by merging these contiguous regions into one.