title: Slow shared memory performance when moved to 64-bit OS
body: <p>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:</p>
  
  <pre><code>flProtect = PAGE_READONLY | SEC_NOCACHE | SEC_COMMIT;
  </code></pre>
  
  <p>when the same memory is created using:</p>
  
  <pre><code>flProtect = PAGE_READONLY | SEC_COMMIT;
  </code></pre>
  
  <p>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.</p>
  
  <p>Can someone enlighten me on why SEC_NOCACHE would affect performance in this situation?</p>
  
  <p><strong>Update:</strong> 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.</p>
  
  <p><strong>Update2:</strong> 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.</p>