Package org.h2.util

Class MemoryUnmapper

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static boolean ENABLED  
      private static java.lang.reflect.Method INVOKE_CLEANER  
      private static java.lang.Object UNSAFE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MemoryUnmapper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean unmap​(java.nio.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.
      • Methods inherited from class java.lang.Object

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

      • ENABLED

        private static final boolean ENABLED
      • UNSAFE

        private static final java.lang.Object UNSAFE
      • INVOKE_CLEANER

        private static final java.lang.reflect.Method INVOKE_CLEANER
    • Constructor Detail

      • MemoryUnmapper

        private MemoryUnmapper()
    • Method Detail

      • unmap

        public static boolean unmap​(java.nio.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