top gives all kinds of actual memory stats:
VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes
all code, data and shared libraries plus pages that have been
VIRT = SWAP + RES.
SWAP -- Swapped size (kb)
The swapped out portion of a task's total virtual memory image.
RES -- Resident size (kb)
The non-swapped physical memory a task has used.
RES = CODE + DATA.
CODE -- Code size (kb)
The amount of physical memory devoted to executable code, also
known as the 'text resident set' size or TRS.
DATA -- Data+Stack size (kb)
The amount of physical memory devoted to other than executable
code, also known as the 'data resident set' size or DRS.
SHR -- Shared Mem size (kb)
The amount of shared memory used by a task. It simply reflects
memory that could be potentially shared with other processes.
$ man top