You have to start by defining your terms. Do you mean physical memory or virtual memory? What about shared libraries used by more than once process?
Is your question more like "how much RAM is it using right this second"? Or is it more like "how much RAM did it need while it was running?".
It would be more helpful if you explained what you wanted to do with the information. That would make it easier to point you towards the information you actually do need.
Thank you for your reasonable comments. I'll try to define my problem more precisely. For instance I has quad core machine with X GB of RAM and try to compile huge project using multiple compilation processes. I would like to know will swap be used during compilation or not. As a result, I'm interesting how many virtual memory one compilation process consume right this moment.
To evaluate better possibility of your computer download an standard source Linux and after (./configure) for test make --job=8 and repeat with increase 10 ,15, 20 ext... In parallel with an other shell execute cat /proc/meminfo several times. to observe comportment of system.