I'm working on some "free RAM" tool that has to force windows to send 'LOW_MEMORY'
signal to all applications (that asks all application to free their unused data, SQL server and file caches get cleared so you'll end up with lots of extra free space).
What will be best approach to do it in C++? The most "natural" solution for me would be to allocate a big amount of memory, but is it a "good" and "stable" way? Maybe there is any c++ Windows native function for it in WinAPI or somewhere else?
p.s. The concept of that tool came from (and I know that better way is to... buy some RAM, but I have to write such tool now):
https://superuser.com/questions/214526/how-does-a-free-up-ram-utility-free-up-ram