mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
Only COW on fault if the physical page has retain_count > 1.
This makes COW pages lazily-but-transparently revert back to read/write.
This commit is contained in:
parent
2d045d2a64
commit
9e62eb4856
4 changed files with 17 additions and 2 deletions
|
@ -61,9 +61,10 @@ ByteBuffer procfs$pid_vm(Process& process)
|
|||
region->name.characters());
|
||||
for (size_t i = 0; i < region->physical_pages.size(); ++i) {
|
||||
auto& physical_page = region->physical_pages[i];
|
||||
ptr += ksprintf(ptr, "P%x%s ",
|
||||
ptr += ksprintf(ptr, "P%x%s(%u) ",
|
||||
physical_page ? physical_page->paddr().get() : 0,
|
||||
region->cow_map.get(i) ? "!" : ""
|
||||
region->cow_map.get(i) ? "!" : "",
|
||||
physical_page->retain_count()
|
||||
);
|
||||
}
|
||||
ptr += ksprintf(ptr, "\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue