How to load (or map) file part maximum size, but fit in RAM on Windows?
问题 There is big file. I need fast sort it. I going to process the file by part, that fit in RAM, to avoid/degrees using page file (next step: merge parts). How to use max RAM? My solution: use WinApi file memory mapping, but I don't knew how to get part of file maximum size, but fit RAM (how to determine size)? 回答1: You can VirtualLock the pages you want to process. It locks in physical memory the size you need (if there is enough) swapping others to the paging file. You can use the