please tell me how to use rational purify or any other method to find memory leak
libumem and Sun studio dbx rtc are both free, non-intrusive and efficient tools for that task.
Finding Memory leaks Within Solaris Applications Using libumem : Panchaleswar Nayak's Weblog
check Command (Sun Studio 12: Debugging a Program With dbx) - Sun Microsystems
dbx, dtrace, truss, xxd, and elvis are very useful
Have a look at /usr/ucb/ps -aux. This will give you a list of processes and what percentage of the memory they are using.
You can also sort by VSZ size :
# ps -ef -o vsz,pid,args | sort -n