memstat
Get information about the RAM memory used by linux processes.
Download the code and build the program. It only reads files in /proc, so it should be harmless running it.
It requires some recent linux kernel (> 2.1.14) with the options CONFIG_MMU and CONFIG_PROC_PAGE_MONITOR enabled.
usage: memstat Columns: ARSS Sum of RSS of anonymous pages (heap + stack + anonymous mmaps) APSS Sum of PSS (proportional RSS) of anonymous pages ASIZE Sum of virtual size of anonymous pages RSS Sum of RSS of the process mmaps PSS Sum of PSS of the process mmaps FNoSH Sum of the non-shared RSS of the non-anonymous mmaps (Files not shared) CMD (PID) Command and PID of the process