From 99443aa5f11c05e80c0b1fcf20cdf7f4758ab10b Mon Sep 17 00:00:00 2001
From: Peter Ganten <peter@ganten.org>
Date: Tue, 1 Aug 2000 23:39:07 +0000
Subject: [PATCH] Committing a page of a shared mapping in one process lets it
 appear committed in other processes, too. To fake this, we commit them as
 soon as they are mapped.

---
 memory/virtual.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/memory/virtual.c b/memory/virtual.c
index dd2281d6138..66382d3a86e 100644
--- a/memory/virtual.c
+++ b/memory/virtual.c
@@ -1239,6 +1239,14 @@ LPVOID WINAPI MapViewOfFileEx(
         goto error;
     }
 
+    /* FIXME: If a mapping is created with SEC_RESERVE and a process,
+     * which has a view of this mapping commits some pages, they will
+     * appear commited in all other processes, which have the same
+     * view created. Since we don`t support this yet, we create the
+     * whole mapping commited.
+     */
+    prot |= VPROT_COMMITTED;
+
     /* Map the file */
 
     TRACE("handle=%x size=%x offset=%lx\n", handle, size, offset_low );
-- 
GitLab