Java Memory Max maxMemoryInMbs()

Here you can find the source of maxMemoryInMbs()

Description

max Memory In Mbs

License

Apache License

Return

The maximum JVM heap size in Mbs, rounded down.

Declaration

private static int maxMemoryInMbs() 

Method Source Code

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

public class Main {
    /**/*  w  ww . ja  v a2s  . co  m*/
     * @return The maximum JVM heap size in Mbs, rounded down.
     */
    private static int maxMemoryInMbs() {
        return (int) (Runtime.getRuntime().maxMemory() / (1024 * 1024));
    }
}

Related

  1. maxMemory()
  2. maxMemory()
  3. maxMemory()
  4. maxMemory()
  5. maxMemoryb()
  6. maxMemoryMB()
  7. memoryMax()
  8. memoryMax()