Java Memory Usage getMemoryUsage()

Here you can find the source of getMemoryUsage()

Description

get Memory Usage

License

BSD License

Declaration

public static long getMemoryUsage() 

Method Source Code

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

public class Main {
    private static Runtime runtime = Runtime.getRuntime();

    public static long getMemoryUsage() {
        return runtime.totalMemory() - runtime.freeMemory();
    }//from  www  .  jav a 2  s  . c o  m
}

Related

  1. getMemoryUsage()
  2. getMemoryUsage()
  3. getMemoryUsage()
  4. getMemoryUsage()
  5. getMemoryUsage()
  6. getMemoryUsage()
  7. getMemoryUsage()
  8. getMemoryUsage()
  9. getMemoryUsageSimpleHr()