title: Best way to use shared memory that can be read directly by different processes without copy overhead
body: <p>I have an application where the initialization involves reading very large data from files (~ > 10 GB) and then performing some computations on this data (which is of type <strong>Dictionary</strong>). The initialization step takes a couple of hours every time even though my data is fixed/never changed. What I'd like to do is somehow use a process to pre-load these data into memory and another process on the same machine to read directly from it <strong>all data only once, and without any COPY</strong>. So far, I have found a couple methods: </p>
  
  <ul>
  <li><p>.Net Remoting with remote objects. However this approach bears the marshaling cost so wouldn't work for my case since the data transfer would result in twice as much memory at one point.</p></li>
  <li><p>Memory mapped files. This option still seems to require data copy and for my case it won't be ideal since I'd need to copy all >10GB of data. I have found some articles about using unsafe access to memory addresses but I don't exactly know how this works. </p></li>
  <li><p>WCF Named Pipes. This approach seems similar to remoting and still requires data transfer. </p></li>
  </ul>
  
  <p>What's the most effective way for my scenario?</p>