Java performance tuning, JNI memory leak

2019-05-10 11:07发布

问题:

I have a Java application. It is a Linux platform. and we are using Java 6. It is normal sdk java plus some JNI.

We using visualvm to monitor the memory leak. We notice from visualvm application does not consume heap continuously. But the whole process memory increases all the time up to linux killing the process.

Then we are suspecting the JNI part. Since JNI part memory leak could not be seen by visualvm. Could someone drop some hints on how to check JNI memory leak when do Java Performance testing?

回答1:

Oracle has some documentation on how you can create your own leak tracker in such a case. The dbx command is mentioned as one alternative available on Linux.