Class JvmHeapAccess

java.lang.Object
org.postgresql.util.internal.JvmHeapAccess

public final class JvmHeapAccess extends 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.

  • Constructor Details

    • JvmHeapAccess

      private JvmHeapAccess()
  • Method Details

    • maxHeapBytes

      public static long maxHeapBytes()