I need code for the memory monitor using Swing which displays the memory pool contents such as code cache, eden space, survivor space, perm gen, temred gen, tenured space and plots memory usage graph.
+1
A:
You can use the ManagementFactory
class to get the information you need.
Joachim Sauer
2010-08-20 09:02:57
A:
You can also use Runtime
class to get basic memory information:
long totalMemory = Runtime.getRuntime().totalMemory();
long freeMemory = Runtime.getRuntime().freeMemory();
long maxMemory = Runtime.getRuntime().maxMemory();
denis_k
2010-08-20 10:54:09