I understand I can use: pmap pid where pid is the process id I'd like to run pmap on, but what if I have a program that I wrote that simply executes once then closes, how would I get the pid for this process? Would it even have a pid after it closes?
As an example lets say I have example.c, which I've compiled into example.
I run it using ./example and it runs once then closes.
How would I use pmap to see the memory usage of example?