Notification before running out of memory
It happened twice in a rather short time. First time it was when I had 1GB of real RAM and now I have 1.5GB. The first time culprit was Firefox and the second time I can't be entirely sure as I had both Firefox and Amarok running, but I suspect an AJAX application I've been using.
Running out of RAM and even swap is just disastrous, putting the system to a complete crawl. You can barely kill anything.
Personally I consider this a considerable flaw in a system that advertises itself as user friendly. It should, by default, notify the user before running out of memory. Imagine if this sort of thing happened to someone non-technical! For starts, they wouldn't have a freaking idea about what happened, let alone how to remedy or avoid it in the future.
But no, our beloved OS just goes on like nothing's happening, until it smashes into the wall!
So... I'm looking for a notification program which would notify me when I'm using too much RAM (real or swap or both). If this doesn't exist I'd like to do it manually, with some sort of a bash script perhaps. It should monitor the memory usage and then pop up a message that I'm running out of memory.