Java Memory Total getTotalMemory()

Here you can find the source of getTotalMemory()

Description

get Total Memory

License

Open Source License

Declaration

public static long getTotalMemory() 

Method Source Code

//package com.java2s;
/*/*from  ww  w  .  j a v a2 s .  c  o m*/
 * $Id$
 * --------------------------------------------------------------------------------------
 * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 *
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */

public class Main {
    private static Runtime runtime = Runtime.getRuntime();

    public static long getTotalMemory() {
        return runtime.totalMemory();
    }
}

Related

  1. getJavaTotalMemory()
  2. getJvmTotalMemory()
  3. getMemoryTotal()
  4. getTotalFreeMemory()
  5. getTotalMemory()
  6. getTotalMemory(boolean preRunGarbageCollector)
  7. getTotalMemoryInKB()
  8. getTotalMemoryInMb()
  9. jvmTotalMemory(String size, Boolean txtByte)