How to keep windows from paging block of memory

Posted by photo_tom on Stack Overflow See other posts from Stack Overflow or by photo_tom
Published on 2010-04-02T17:50:25Z Indexed on 2010/04/02 17:53 UTC
Read the original article Hit count: 224

Filed under:
|

We are working on a Vista/Windows 7 applicaiton 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.

I've done a fair amount of research and cannot find documenation 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?

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.

Suggestions?

© Stack Overflow or respective owner

Related posts about Windows

Related posts about memory-management