On Windows GetWriteWatch won't work if the range is not withing a single
memory view regardless of MEM_LARGE_PAGES (that is, single VirtualAlloc
result, somewhat analogous to VMA but not quite), such a call will
result in an error.
For the context, Windows never auto splits or joins memory views, and
basically nothing can be done across views boundary (merging placeholder
views is an exception, while unrelated). VirtualProtect (which stands
for mprotect) can be done for individual pages withing the view of
course, but it is purely per page and doesn't affect view protection
flags or result in any splitting of those. VirtualProtect across views
adjacent in memory will also fail.
On 7/27/23 05:18, Michał Mirosław wrote:
Is it possible (on Windows) to have MEM_LARGE_PAGES allocation near a
normal one and run GetWriteWatch() on both in one call? If so, how
does it behave / what is expected?
Best Regards
Michał Mirosław