开发者

Preventing Windows from paging some data

I have a large block of data in memory that I don't want Windows to page. The memory is a cache of a section开发者_如何转开发 of data that can be reconstructed from files on disk. The cache is meant to completely prevent hard drive accesses as long as enough memory is available, so it's worthless to me if Windows starts paging it. Instead of paging, I would like my application to simply free the memory if required (as mentioned in this post).

Is there any way to allocate a block of memory as non-pagable?


VirtualLock() is probably what you are looking for. Raymond Chen has some more info in it here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜