Java Memory Max getJavaMaxMemory()

Here you can find the source of getJavaMaxMemory()

Description

Return maximum amount of memory the JVM will attempt to use

License

Open Source License

Declaration

public static long getJavaMaxMemory() 

Method Source Code

//package com.java2s;
/*/*  www.j  a  v  a2s. co  m*/
 * Copyright 2010-2013 Institut Pasteur.
 * 
 * This file is part of Icy.
 * 
 * Icy is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Icy is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Icy. If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    /**
     * Return maximum amount of memory the JVM will attempt to use
     */
    public static long getJavaMaxMemory() {
        return Runtime.getRuntime().maxMemory();
    }
}

Related

  1. checkMaxMemory()
  2. freeMaxMemory()
  3. getJvmMaxMemory()
  4. getMaximumMemory()
  5. getMaximumMemory()
  6. getMaximumMemory()