Examples of MemoryPoolMXBean


Examples of java.lang.management.MemoryPoolMXBean

    Iterator beans = ManagementFactory.getMemoryPoolMXBeans().iterator();
    long aftergc = 0;
    long maxaftergc = 0;
   
    while (beans.hasNext()){
      MemoryPoolMXBean bean = (MemoryPoolMXBean) beans.next();
      String beanname = bean.getName();
     
      if(!beanname.toUpperCase().contains("OLD GEN")) continue;
     
      MemoryUsage mu = bean.getCollectionUsage();
     
      if(mu == null) continue;
     
      aftergc = mu.getUsed();
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.