Prevent Windows from swapping some data

I have a large block of data in memory that I don't want the Windows page. Memory is a cache of a data partition that can be recovered from files on disk. The cache is designed to completely prevent access to the hard drive if enough memory is available, so it's no use to me if Windows starts swapping it. Instead of paging, I would like my application to just free memory if required ( as mentioned in this post ).

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

+2


source to share


1 answer


VirtualLock () is probably what you are looking for. Raymond Chen has more information here .



+1


source







All Articles