Package org.apache.flink.core.memory
Class MemoryUtils
- java.lang.Object
-
- org.apache.flink.core.memory.MemoryUtils
-
@Internal public class MemoryUtils extends Object
Utility class for memory operations.
-
-
Field Summary
Fields Modifier and Type Field Description static ByteOrderNATIVE_BYTE_ORDERThe native byte order of the platform on which the system currently runs.static sun.misc.UnsafeUNSAFEThe "unsafe", which can be used to perform native memory accesses.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longgetByteBufferAddress(ByteBuffer buffer)Get native memory address wrapped by the givenByteBuffer.
-
-
-
Field Detail
-
UNSAFE
public static final sun.misc.Unsafe UNSAFE
The "unsafe", which can be used to perform native memory accesses.
-
NATIVE_BYTE_ORDER
public static final ByteOrder NATIVE_BYTE_ORDER
The native byte order of the platform on which the system currently runs.
-
-
Method Detail
-
getByteBufferAddress
public static long getByteBufferAddress(ByteBuffer buffer)
Get native memory address wrapped by the givenByteBuffer.- Parameters:
buffer-ByteBufferwhich wraps the native memory address to get- Returns:
- native memory address wrapped by the given
ByteBuffer
-
-