public final class MemoryUtil extends Object
Modifier and Type | Method and Description |
---|---|
static long |
getFreeMemory()
Gets the JVM free memory.
|
static long |
getFreeMemory(boolean attemptGC)
Gets the JVM free memory.
|
public static long getFreeMemory()
public static long getFreeMemory(boolean attemptGC)
attemptGC
- true
to attempts to perform garbage
collection to free up as much unused memory as possible
before assessing how much memory remains in the JVM instance.Copyright © 2008–2021 Norconex Inc.. All rights reserved.