Reputation: 91
i just landed on SunOS:
$ uname -a
SunOS sunfi95 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire-880
and have Sun studio:
$ CC -V
CC: Sun C++ 5.8 2005/10/13
How I can find memleaks in code? (dbx is not a option in this case). Valgrind does not work on sparc systems, only one solution that cross my mind is to use some smart lib that will overload new and delete and count how many times they are called. Anyone know something that is on BSD like license?
Upvotes: 0
Views: 2201
Reputation: 116169
You can also use an application called cppcheck to find memory leaks, as well as a number of other problems. It's a free/open source product.
I've never used it on SunOS or Sparc machines, but the source is available and you could try to build it. I'm not sure what goes on under the hood, but I don't see why you couldn't build it on a SunOS Sparc machine.
Upvotes: 1
Reputation: 91
DTrace can be very useful for working out what's going on in Solaris applications.
Here's an example of how to use it from Sun.
Upvotes: 2
Reputation: 1424
On Sun OS you can use Purify, or try to port(generally you'll port the leak, too) your program to Unix/Linux and use valgrind to find the leak.
Upvotes: 4
Reputation: 1424
I think there are freeware libs but we use Purify on Solaris which works well.
Upvotes: 1