Java Memory memory()

Here you can find the source of memory()

Description

memory

License

Open Source License

Declaration

public static String memory() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String memory() {
        String str = "";
        str += "memory : "
                + ((double) Runtime.getRuntime().freeMemory() / (double) Runtime.getRuntime().totalMemory()) * 100
                + "% free<br>";

        str += "memory total : " + Runtime.getRuntime().totalMemory() + "<br>";
        str += "memory free : " + Runtime.getRuntime().freeMemory() + "<br>";
        return str;
    }//from  w w  w .ja v a  2 s .  com
}

Related

  1. isMemorySufficient()
  2. logMemoryStats(String msg)
  3. makeVmMemoryDivisibleBy4(long memory)
  4. measureMemoryBefore()
  5. memory()
  6. memory()
  7. memoryEqual(byte[] left, int leftOffset, byte[] right, int rightOffset, int length)
  8. memoryInfo()
  9. memoryIsLow()