Package com.norconex.commons.lang

# Class MemoryUtil

java.lang.Object
com.norconex.commons.lang.MemoryUtil

public final class MemoryUtil extends Object
Memory-related utility methods.

Since:
  1.5.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static long`
  `getFreeMemory()`
  Gets the JVM free memory.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getFreeMemory

    public static long getFreeMemory()
    Gets the JVM free memory. The free memory is calculated by taking the JVM current free memory, plus the difference between the maximum possible JVM memory and the total JVM memory taken so far.
    Returns:
      JVM free memory in bytes