Java Memory Information printMemory(String label)

Here you can find the source of printMemory(String label)

Description

print Memory

License

Open Source License

Declaration

public static void printMemory(String label) 

Method Source Code

//package com.java2s;

public class Main {
    public static void printMemory(String label) {
        System.out.println(label);
        Runtime rt = Runtime.getRuntime();
        System.out.println("  Total memory: " + rt.totalMemory());
        System.out.println("  Free memory:  " + rt.freeMemory());
        System.out.println("  Max memory:   " + rt.maxMemory());
    }// w w  w .ja  v a 2s . com
}

Related

  1. parseMemorySize(String arg)
  2. prettyPrintMemory(long size, boolean includeSpace)
  3. prettyPrintMemoryPerSecond(long rate)
  4. printMemory()
  5. printMemory()
  6. printMemory(String str)
  7. printMemoryInfo()
  8. printMemoryInstruction(byte[] instruction)
  9. showMemory()