We know that every process in cisco router requires memory to store its attributes ot data and we always excite to see the memory used by the process. Given is the command which helps to know about the process id of the process.
show processes memory sorted
PID TTY Allocated Freed Holding Getbufs Retbufs Process
0 0 64551468 7466932 49502136 0 0 *Init*
226 0 1263113088 1362187140 44258324 136024 0 BGP Router
The above mentioned output states that process id used by bgp is 226. Now run the given command to see the memory occupied by bgp process.
show processes memory 226Process ID: 226
Process Name: BGP Router
Total Memory Held: 44310980 bytes (48 Mb)
These commands help to troubleshoot memory related issues very fastly.