Memory memory with memory memory

I relate to the memory of a large file (~ 200 GB) in one region / view and write to it sequentially. From time to time I perform boost::interprocess::mapped_region::flush(last, current, false).

After some time, the process uses the entire system memory. Which of what I understand is normal, as it will free up memory as another process request memory.

This works well in Windows 8. However, working in Windows 7, it seems that it does not work very well with drivers for AJA video cards, and it starts to affect performance (removing IO packets).

Is there a way to get Windows 7 to flush parts of the memory to disk (after the data is written, it is only interesting for a few seconds, and remember that I write sequentially throughout the file), as for not using all available system memory?

+4
source share
1 answer

Flushing has nothing to do with land reclamation, IYAM. It just makes sure that the dirty pages are written out (I think you still need synchronization with the disk to make sure that it actually / got to disk /).

So you are looking for a way to unmap.

Perhaps you can use a function like

, unmapping . , , ( , ​​ , , - madvise() Windows)

+3

Source: https://habr.com/ru/post/1544788/


All Articles