loop for pmap -x

I would to create a command /script where I want lauch pmap -x pid for each procces which is launched on server , and I don't know how to write a loop where it would be included .

something like:

for all processes:
ps -e -o pid | xargs pmap -x

or for single user:
 ps -u $USER -o pid | xargs pmap -x

HTH

A loop isn't required:

pmap -x /proc/*