Java Memory Used getMemoryUsedBytes ()

Here you can find the source of getMemoryUsedBytes ()

Description

get Memory Used Bytes

License

Apache License

Declaration

public static long getMemoryUsedBytes ()
    

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file

public class Main {
    public static long getMemoryUsedBytes() {
        final Runtime runtime = Runtime.getRuntime();
        return runtime.totalMemory() - runtime.freeMemory();
    }/*w w  w  . ja  v a  2 s .  c om*/
}

Related

  1. getMemoryInUse()
  2. getMemoryUse()
  3. getMemoryUsed()
  4. getMemoryUsed()
  5. getMemoryUsed()
  6. getMemoryUsege()
  7. getUsedMemory()
  8. getUsedMemory()
  9. getUsedMemory()