Java Memory Information getMemoryInfo()

Here you can find the source of getMemoryInfo()

Description

get Memory Info

License

Apache License

Declaration

public static String getMemoryInfo() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String getMemoryInfo() {
        return Runtime.getRuntime().totalMemory() / 1024L / 1024L + "M/"
                + Runtime.getRuntime().maxMemory() / 1024L / 1024L + "M";
    }//  ww w . j av a2 s  .  c o  m
}

Related

  1. getMemory()
  2. getMemory()
  3. getMemory(String memory)
  4. getMemoryConsumedSincePreviousCall()
  5. getMemoryIncrease()
  6. getMemoryLimit()
  7. getMemoryLimitMinSize()
  8. getMemoryStats()
  9. getMemoryStats(int mode)