Anybody know how Windows VirtualProtect timing works across threads? If I call VirtualProtect(...PAGE_READONLY) then set a flag via LOCK OR, is it possible that other threads will see the flag set but still be able to write to the page?
I want to call VirtualProtect to make a page read-only, then check the contents of the page, with confidence that no further changes will show up later due to delays in other threads recognized the page as read-only.
-
-
In that case, I believe you should be good to go. I'm still trying to find the relevant documentation.
-
Virtual protect does a cross processor TLB flush
- 1 more reply
New conversation -
-
-
If the return value is NT_SUCCESS no further changes will apply. However, keep in mind that other threads might call VirtualProtect before writing to a page you locked. In that case you might want to hook VirtualProtect as well and alter calls.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.