Package org.h2.util
Class MemoryUnmapper
- java.lang.Object
-
- org.h2.util.MemoryUnmapper
-
public final class MemoryUnmapper extends java.lang.ObjectUnsafe memory unmapper.- See Also:
SysProperties.NIO_CLEANER_HACK
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanENABLEDprivate static java.lang.reflect.MethodINVOKE_CLEANERprivate static java.lang.ObjectUNSAFE
-
Constructor Summary
Constructors Modifier Constructor Description privateMemoryUnmapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanunmap(java.nio.ByteBuffer buffer)Tries to unmap memory for the specified byte buffer using Java internals in unsafe way ifSysProperties.NIO_CLEANER_HACKis enabled and access is not denied by a security manager.
-
-
-
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 ifSysProperties.NIO_CLEANER_HACKis enabled and access is not denied by a security manager.- Parameters:
buffer- mapped byte buffer- Returns:
- whether operation was successful
-
-