Java Memory Max getMemoryMax()

Here you can find the source of getMemoryMax()

Description

Get the maximum memory in KB.

License

Mozilla Public License

Return

the maximum memory

Declaration

public static long getMemoryMax() 

Method Source Code

//package com.java2s;
/*//from  ww  w . java2  s . c o m
 * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
 * and the EPL 1.0 (http://h2database.com/html/license.html).
 * Initial Developer: H2 Group
 */

public class Main {
    /**
     * Get the maximum memory in KB.
     *
     * @return the maximum memory
     */
    public static long getMemoryMax() {
        long max = Runtime.getRuntime().maxMemory();
        return max / 1024;
    }
}

Related

  1. getMaximumMemory()
  2. getMaxMemory()
  3. getMaxMemory()
  4. getMaxMemoryStr()
  5. getMemoryMax()
  6. jvmMaxMemory(String size, Boolean txtByte)
  7. maxMemory()
  8. maxMemory()
  9. maxMemory()