private void logMemoryStatistics(){
  MemoryUsage heapMemoryUsage=memoryMXBean.getHeapMemoryUsage();
  MemoryUsage nonHeapMemoryUsage=memoryMXBean.getNonHeapMemoryUsage();
  log.info("Heap: " + heapMemoryUsage);
  logGraphicalMemoryUsage(heapMemoryUsage,"Heap");
  log.info("Non Heap: " + nonHeapMemoryUsage);
  logGraphicalMemoryUsage(nonHeapMemoryUsage,"Non-Heap");
  log.info("Pending finalizations: " + memoryMXBean.getObjectPendingFinalizationCount());
}

private void logMemoryStatistics ( ) { MemoryUsage heapMemoryUsage = memoryMXBean . getHeapMemoryUsage ( ) ; MemoryUsage nonHeapMemoryUsage = memoryMXBean . getNonHeapMemoryUsage ( ) ; log . info ( "Heap: " + heapMemoryUsage ) ; logGraphicalMemoryUsage ( heapMemoryUsage , "Heap" ) ; log . info ( "Non Heap: " + nonHeapMemoryUsage ) ; logGraphicalMemoryUsage ( nonHeapMemoryUsage , "Non-Heap" ) ; log . info ( "Pending finalizations: " + memoryMXBean . getObjectPendingFinalizationCount ( ) ) ; }
log the memory statistics .
