Package org.h2.util

Class MemoryUnmapper

java.lang.Object
org.h2.util.MemoryUnmapper

public final class MemoryUnmapper extends Object
Unsafe memory unmapper.
See Also:
  • Field Details

    • ENABLED

      private static final boolean ENABLED
    • UNSAFE

      private static final Object UNSAFE
    • INVOKE_CLEANER

      private static final Method INVOKE_CLEANER
  • Constructor Details

    • MemoryUnmapper

      private MemoryUnmapper()
  • Method Details

    • unmap

      public static boolean unmap(ByteBuffer buffer)
      Tries to unmap memory for the specified byte buffer using Java internals in unsafe way if SysProperties.NIO_CLEANER_HACK is enabled and access is not denied by a security manager.
      Parameters:
      buffer - mapped byte buffer
      Returns:
      whether operation was successful