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).-brotherS
AFAIK,
Free is (roughly) the value of
Available minus
Cached. However, the data in
Cached is
not 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 and/or
Cached values anyway.
Maybe somebody else can point me to one.