Hello,
I am developing a complex multithreaded application in Java which
uses JNI to call methods in "C". I am developing on a linux ix386 based
machine (RedHat 9).
I found out that there is memory leak , probably in the JNI "C" part,
after some time ( by JNI "C" part I mean the methods I wrote in "C"
which are called from Java) ; However,I tried to find a tool which can
help
me detect where is the memoy leak , and could not find someting
appropriate.
For C/C++ on Linux ,there is of course the Electric Fence and Valgrind
open source projects;
and there is also commercial solutions like Insure++ of Parasoft and
Purify (of Rational) .But they are intended for running standalone
c/c++ applications.
For Java there is OptimizeIt of Boreland. I am sure there are more;
but as far as I know the OptimizeIt will not detecet a memory leak if
it is in the JNI part.
Does anybody know of any memory leak tool (commercial or open source)
which can
detect memory leaks on a
Java application which calls "C" methods (using JNI)?
(I mean a tool which can detect such memory leaks in the "C" (JNI) part
of an
app which is called from Java).
Regards,
John
Bocanegra - 16 Mar 2005 09:00 GMT
You can use simply the same program as in C++. We used Purify and works
perfectly. Put as the name of the executable /usr/java/bin/java, and so on.
> Hello,
>
[quoted text clipped - 29 lines]
> Regards,
> John