I'm working on a large application (300K LOC) that is causing a memory leak in the Sun 1.6 JVM (1.6_05). Profiling the Java shows no leak. Are there any diagnostics available from the JVM that might detect the cause of the leak?
I haven't been able to create a simple, isolated Java test case. Is the only way to figure this out by using a C heap analyzer on the JVM?
The application creates a pool of sockets and does a significant amount of network I/O.
views:
202answers:
2
+1
A:
Some profiler like profiler4j can show the manged and the unmanged memory (live curve). Then you can see if you has a leak and when the leak occur. But you does not find more informations.
After this there are 2 possible solutions:
- You can with the live curve isolate the problem and create a simpler test until you have find the cause of the problem.
- You search your code for the typical problems like:
- Instances of the class Thread that are never start.
- Images or Graphics that never are dispose
- ODBC Bridge Objects that are never close
Horcrux7
2008-09-20 13:06:56
A:
I love valgrind (http://valgrind.org/) if you are executing it on a system it supports. It rocks.
Sam
Sam Reynolds
2008-09-20 13:08:12