your issue may not exactly be a memory leak but rather an unplanned consequence of one of the lines in your program ... use either dtrace or truss or lsof to check what your program is actually doing ...
If you cant see any memory leaks in your code then how come its incore footprint is increasing steadily so use valgrind or "electric fence" to detect these sort of errors...
There are a couple of tools that are very efficient to track memory leaks under Solaris. Not Valgrind or Electric Fence which are as far as I know not ported (or reliable) on that platform.
You can use libumem and mdb ::findleaks which are standard tools or use dbx which is part of the studio compiler and its "check" command.