mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
Kernel: CoW-clone private inode-backed memory regions on fork()
When forking a process, we now turn all of the private inode-backed mmap() regions into copy-on-write regions in both the parent and child. This patch also removes an assertion that becomes irrelevant.
This commit is contained in:
parent
88e12f7632
commit
fddc3c957b
1 changed files with 1 additions and 3 deletions
|
@ -76,8 +76,7 @@ NonnullOwnPtr<Region> Region::clone()
|
|||
{
|
||||
ASSERT(Process::current);
|
||||
|
||||
// FIXME: What should we do for privately mapped SharedInodeVMObjects?
|
||||
if (m_shared || vmobject().is_inode()) {
|
||||
if (m_shared) {
|
||||
ASSERT(!m_stack);
|
||||
#ifdef MM_DEBUG
|
||||
dbg() << "Region::clone(): Sharing " << name() << " (" << vaddr() << ")";
|
||||
|
@ -100,7 +99,6 @@ NonnullOwnPtr<Region> Region::clone()
|
|||
if (m_stack) {
|
||||
ASSERT(is_readable());
|
||||
ASSERT(is_writable());
|
||||
ASSERT(!is_shared());
|
||||
ASSERT(vmobject().is_anonymous());
|
||||
clone_region->set_stack(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue