Class OMemory

java.lang.Object
com.orientechnologies.common.util.OMemory

public class OMemory extends Object
Provides various utilities related to memory management and configuration.
Author:
Sergey Sitnikov
  • Method Details

    • getCappedRuntimeMaxMemory

      public static long getCappedRuntimeMaxMemory(long unlimitedCap)
      Parameters:
      unlimitedCap - the upper limit on reported memory, if JVM reports unlimited memory.
      Returns:
      same as Runtime.maxMemory() except that unlimitedCap limit is applied if JVM reports unlimited memory.
    • checkCacheMemoryConfiguration

      public static void checkCacheMemoryConfiguration()
      Checks the OrientDB cache memory configuration and emits a warning if configuration is invalid.
    • fixCommonConfigurationProblems

      public static void fixCommonConfigurationProblems()
      Tries to fix some common cache/memory configuration problems:
      • Cache size is larger than direct memory size.
      • Memory chunk size is larger than cache size.