mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 21:21:50 +03:00
Kernel: Don't remap already non-writable regions when they become CoW
The only purpose of the remap() in Region::try_clone() is to ensure non-writable page table entries for CoW regions. If a region is already non-writable, there's no need to waste time updating the page tables.
This commit is contained in:
parent
c6adefcfc0
commit
094b88e6a5
Notes:
sideshowbarker
2024-07-17 20:51:25 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/094b88e6a54
@ -94,7 +94,8 @@ ErrorOr<NonnullOwnPtr<Region>> Region::try_clone()
|
||||
auto vmobject_clone = TRY(vmobject().try_clone());
|
||||
|
||||
// Set up a COW region. The parent (this) region becomes COW as well!
|
||||
remap();
|
||||
if (is_writable())
|
||||
remap();
|
||||
|
||||
OwnPtr<KString> clone_region_name;
|
||||
if (m_name)
|
||||
|
Loading…
Reference in New Issue
Block a user