2011.09.11 in #7Memory::Usage - Aktuelle Speichernutzung (Current memory usage) in German
Thomas Fahle gives a code example and explains (in German) how to check what is the memory usage of the current process. So a script or application could report its own memory usage. (This is also Linux/Unix only.)