s it possible for you to base the code on the "free" RAM instead on the "available" RAM? For me, free RAM is a much better indicator: things tend to slow down when all free RAM is used up (probably because of increased pagefile usage).
is (roughly) the value of Available
. However, the data in Cached
written to disk, i.e., it's not swapped to disk. Windows just holds it in memory in case it needs to be used again and it's immediately overwritten, in RAM, by new data if the system needs the RAM. That is, this all happens in RAM, not the HDD/SSD. In other words, your system should release that cached RAM immediately when it's needed and your system shouldn't slow down.
At any rate, I can't seem to find an MSDN article on how to retrieve those Free
Maybe somebody else can point me to one.