1

I am looking for a Windows 7 program that can give me an alert (e.g. pop up around the icon tray) whenever the ratio available RAM / total RAM goes below some configurable threshold. Gratis is better.

  • Do you turn off virtual memory (or severely limit it)? Otherwise, won't Windows 7 always page memory when it gets low? – RockPaperLizard Aug 23 '15 at 23:34
  • @RockPaperLizard yes virtual memory is turned off to avoid swapping – Franck Dernoncourt Aug 23 '15 at 23:38
  • Okay, now it makes sense! ;) – RockPaperLizard Aug 23 '15 at 23:56
  • 1
    On Linux 100% of the memory being used is normal, it is actually a good thing. Isn't it the same on Windows? – Nicolas Raoul Aug 24 '15 at 6:21
  • @NicolasRaoul it's the same. (free vs available physical memory) – Franck Dernoncourt Aug 24 '15 at 21:28
1

I'm using similar tool in a form of lightweight plugin for IM client (client used as kind of container), but it takes only few lines of code, so here is "standalone" version: memwarning. It has no configuration, by default it warns when total memory usage is > 90% checking usage every two minutes. It doesn't show any window, just runs in background. If memory usage is exceeded it beeps with PC speaker three times and checks again after 1 minute. Use Code::Blocks/MinGW to change configuration (modifying ThreadProc()) and/or rebuild.

One disadvantage of using GlobalMemoryStatusEx() function is that it treats system cache memory as used which may give warning earlier than expected. I have no idea how to check memory usage without system buffers.

1

Here is a script of Powershell I just wrote. To use it open up "Powershell" (It's in the start menu, already installed) and run it:

while ($true) {
    $available = (get-counter -counter "\Memory\Available Bytes").CounterSamples[0].CookedValue
    $thresholdInBytes = 100 * 1024*1024;

    echo $available

    if($available -lt $thresholdInBytes) {
        $wshell = New-Object -ComObject Wscript.Shell

        $wshell.Popup("Low RAM available",0,"Ok",0x1)   
    }
    start-sleep -s 5
}

Changed the threshold value if you want a value other than 100MB of ram. I'm licensing it with the WTFPL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.