Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

QFork fixes #236

Merged
merged 4 commits into from May 4, 2015
Merged

QFork fixes #236

merged 4 commits into from May 4, 2015

Conversation

orangemocha
Copy link

Fix for #167 and some other related changes.

Fix for #167

RejoinCOWPages used to call QueryWorkingSetEx to figure out
which pages had been dirtied since the memory map was protected
with PAGE_WRITECOPY. But dirty pages that had been swapped out to
the system page file would be reported as not valid
(VirtualAttributes.Valid == 0) and so we wouldn't restore them into
the file map.
QueryWorkingSetEx only gives information about pages that are in the
working set at the time it is called. Pages can be forced into the
working set using VirtualLock, but that seems like a potentially
risky / expensive solution.
I implemented a solution that uses VirtualQuery to find out which
regions have changed protection from PAGE_WRITECOPY.
VirtualProtect is failing with ERROR_INVALID_PARAMETER.
It's possible that this code path never worked because it is
checking for Windows version 8.0. Windows 8's version number is 6.2,
not 8.0.

Conflicts:
	src/Win32_Interop/Win32_QFork.cpp
Correclty check for Windows 8 version (6.2), in case this code
path gets re-enabled again.
Note that Windows 10 has version number 10.0, so it would finally
take the code path originally intended for Windows 8 and higher.
@ghost ghost added the cla-already-signed label May 1, 2015
@orangemocha orangemocha force-pushed the orangemocha-RejoinCowPages3 branch from bd9361b to 05e0ac8 Compare May 1, 2015 11:23
@orangemocha orangemocha merged commit 05e0ac8 into 2.8 May 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant