When you lock memory with VirtualLock it locks the
memory into your process's working set .
It doesn't mean that the memory will never be paged out.
It just means that the memory won't be paged out as long as there is a thread executing in your process
Read More...