문제

Is it possible to create a memory mapped file for interprocess communication with a guarantee that the content is always being kept in RAM and not flushed to page file?

I am currently working on a bespoke OLAP app. The core idea is to have one process like a memory bank which contains all the data, and multiple worker processes which actually do the calculation. While usually everything works very smoothely, from time to time there is a performance hiccup when a worker tries to create a view on a part of a file which has not been used for a while - hence my question.

Amount of RAM is not a problem (Windows/64 bit) - we just do not know whether it is possible to stop the system from using a page file.

도움이 되었습니까?

해결책

You are probably looking for the VirtualLock function.

Locks the specified region of the process's virtual address space into physical memory, ensuring that subsequent access to the region will not incur a page fault.

Caveat lector.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top