I use process hacker to clear out a few gigs of ram before loading large files such as 2GB stack traces so that everything does not freeze up for an hour as stuff gets swapped back and forth. However process hacker only empties about 200mb at a time.
Are there any programs or windows APIs that lets me empty a few gigs of modified memory to the pagefile at a time?
Answer
The process hacker author provides the source code. Look into the sourcecode and you can find that memlists.c provides what you want:
command = MemoryFlushModifiedList;
status = NtSetSystemInformation(
SystemMemoryListInformation,
&command,
sizeof(SYSTEM_MEMORY_LIST_COMMAND)
);
Code a simple C CLI tool which runs this command.
No comments:
Post a Comment