I am having an issue with a 32-bit legacy app running on 64-bit windows. The app in question uses CreateFileMapping to create shared memory. When this is run on 64-bit Windows any attempt to access this shared memory from another process takes about 1 second. The shared memory is created using page protection flags:
flProtect = PAGE_READONLY | SEC_NOCACHE | SEC_COMMIT;
when the same memory is created using:
flProtect = PAGE_READONLY | SEC_COMMIT;
the issue disappears. For now this work around is acceptable, but we do have some devices that require the SEC_NOCACHE flag to be set.
Can someone enlighten me on why SEC_NOCACHE would affect performance in this situation?
Update: it seems that only writing to this buffer has increased to 1000ms. Reading does not seem to be affected. We are writing about 5MB to the buffer in this time.
Update2: This software is used on many systems, and one of the systems has a physical device that requires the use of this flags. We are currently limited to running the machine with this device in 32bit windows.