One question you might ask is "how much memory is my application consuming?". Obviously you can use prstat (
prstat -cp <pid> or
prstat -cmLp <pid>) to examine the behaviour of a process. But how about programmatically finding that information.
OTN has just published an article where I demonstrate how to find out about the resource use of a process, and incidentally how to put that functionality into a library that reports resource use over time.