Class JvmHeapAccess


  • public final class JvmHeapAccess
    extends java.lang.Object
    Isolated access to ManagementFactory.

    Kept in its own class so that callers can be loaded on runtimes that omit java.lang.management (most notably Android ART). Callers must guard invocations with try { ... } catch (NoClassDefFoundError | LinkageError e) so the verifier never has to resolve ManagementFactory unless this class is actually used.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long maxHeapBytes()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • maxHeapBytes

        public static long maxHeapBytes()