public class MemoryUtils extends Object
Modifier and Type | Method and Description |
---|---|
static double |
freeMemoryFraction()
Get fraction of memory that's free
|
static double |
freeMemoryMB()
Get free memory in megabytes
|
static double |
freePlusUnallocatedMemoryMB()
Get free plus unallocated memory in megabytes
|
static String |
getRuntimeMemoryStats()
Get stringified runtime memory stats
|
static void |
initMetrics()
Initialize metrics tracked by this helper.
|
static double |
maxMemoryMB()
Get maximum memory in megabytes
|
static double |
totalMemoryMB()
Get total memory in megabytes
|
public static double totalMemoryMB()
public static double maxMemoryMB()
public static double freeMemoryMB()
public static double freePlusUnallocatedMemoryMB()
public static double freeMemoryFraction()
public static void initMetrics()
public static String getRuntimeMemoryStats()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.