Java Memory reportMemory()

Here you can find the source of reportMemory()

Description

report Memory

License

Open Source License

Declaration

public static void reportMemory() 

Method Source Code

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

public class Main {
    public static void reportMemory() {
        Runtime runtime = Runtime.getRuntime();
        long mb = 1024 * 1024;
        //    long max = runtime.maxMemory();
        long used = runtime.totalMemory() - runtime.freeMemory();
        System.out.printf("......................... memory in use: %d MB .........................%n", used / mb);
    }/*from   w w  w .j a  v a  2  s . c o  m*/
}

Related

  1. memoryUtilization()
  2. memoryValue(long inBytes)
  3. normalizeMemoryMeasure(String memory)
  4. percentMemoryFull()
  5. removeSliceFromMemory(String schemaName, String cubeName, String loadName)
  6. reportMemory(double val)
  7. simpleMemory()
  8. testMemory(long bytesToTest)
  9. throwOutOfMemoryError()