Java Memory Max getMaximumMemory()

Here you can find the source of getMaximumMemory()

Description

Returns the available maximum amount of memory (in MB) this JVM can use.

License

Open Source License

Return

maximum memory

Declaration

public static int getMaximumMemory() 

Method Source Code

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

public class Main {
    /**//  w  w  w. java  2  s  .com
     * Returns the available maximum amount of memory (in MB) this JVM can use.
     *
     * @return maximum memory
     */
    public static int getMaximumMemory() {
        return Math.round((float) (Runtime.getRuntime().maxMemory() / 1048576L));
    }
}

Related

  1. getJavaMaxMemory()
  2. getJvmMaxMemory()
  3. getMaximumMemory()
  4. getMaximumMemory()
  5. getMaximumMemory()
  6. getMaxMemory()
  7. getMaxMemory()
  8. getMaxMemoryStr()
  9. getMemoryMax()