title: How to keep windows from paging block of memory
body: <p>We are working on a Vista/Windows 7 application that will be running in 64 bit mode using VS2008/C++.  We will be needing to cache hundreds of 2-3 mb blobs of data in RAM for performance reasons up to some memory limit.  Our usage profile is such that we cannot read the data in fast enough if it is all on the the disk.  Cached Memory usage will be larger than 1gb memory used.  For this to work well, we need to ensure that Windows does not page this memory out as it will defeat the purpose of why we are doing this.  </p>
  
  <p>I've done a fair amount of research and cannot find documentation that states exactly how to do this.  I've seen several references that infer memory mapped files work this way.  Is there an expert who can clarify this for me?</p>
  
  <p>I'm aware there are other programs that we could adapt to do this, for example, splitting the blobs and loading into memcache or inmemory databases, but they all have too many problems with performance or code complexity.</p>
  
  <p>Suggestions?</p>