Class NativeMemory


  • public abstract class NativeMemory
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static long ADDRESS_OFFSET  
      (package private) static java.lang.ref.Cleaner CLEANER  
      (package private) static long SIZE_BYTE  
      (package private) static long SIZE_DOUBLE  
      (package private) static long SIZE_FLOAT  
      (package private) static long SIZE_INT  
      (package private) static long SIZE_LONG  
      (package private) static long SIZE_SHORT  
      (package private) static sun.misc.Unsafe UNSAFE  
      (package private) static byte ZERO_BYTE  
      (package private) static double ZERO_DOUBLE  
      (package private) static float ZERO_FLOAT  
      (package private) static int ZERO_INT  
      (package private) static long ZERO_LONG  
      (package private) static short ZERO_SHORT  
    • Constructor Summary

      Constructors 
      Constructor Description
      NativeMemory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static long allocate​(java.lang.Object owner, long bytes)  
      static long allocateByteArray​(java.lang.Object owner, long count)  
      static long allocateDoubleArray​(java.lang.Object owner, long count)  
      static long allocateFloatArray​(java.lang.Object owner, long count)  
      static long allocateIntArray​(java.lang.Object owner, long count)  
      static long allocateLongArray​(java.lang.Object owner, long count)  
      static long allocateShortArray​(java.lang.Object owner, long count)  
      static void fillByteArray​(long basePointer, long count, byte value)  
      static void fillDoubleArray​(long basePointer, long count, double value)  
      static void fillFloatArray​(long basePointer, long count, float value)  
      static void fillIntArray​(long basePointer, long count, int value)  
      static void fillLongArray​(long basePointer, long count, long value)  
      static void fillShortArray​(long basePointer, long count, short value)  
      static long getAddressOf​(java.nio.Buffer buffer)  
      static byte getByte​(long address)  
      static byte getByte​(long basePointer, long index)  
      static char getChar​(long address)  
      static double getDouble​(long address)  
      static double getDouble​(long basePointer, long index)  
      static float getFloat​(long address)  
      static float getFloat​(long basePointer, long index)  
      static int getInt​(long address)  
      static int getInt​(long basePointer, long index)  
      static long getLong​(long address)  
      static long getLong​(long basePointer, long index)  
      static short getShort​(long address)  
      static short getShort​(long basePointer, long index)  
      static void initialiseByteArray​(long basePointer, long count)  
      static void initialiseDoubleArray​(long basePointer, long count)  
      static void initialiseFloatArray​(long basePointer, long count)  
      static void initialiseIntArray​(long basePointer, long count)  
      static void initialiseLongArray​(long basePointer, long count)  
      static void initialiseShortArray​(long basePointer, long count)  
      static void setByte​(long basePointer, long index, byte value)  
      static void setDouble​(long basePointer, long index, double value)  
      static void setFloat​(long basePointer, long index, float value)  
      static void setInt​(long basePointer, long index, int value)  
      static void setLong​(long basePointer, long index, long value)  
      static void setShort​(long basePointer, long index, short value)  
      • Methods inherited from class java.lang.Object

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

      • ADDRESS_OFFSET

        static final long ADDRESS_OFFSET
      • CLEANER

        static final java.lang.ref.Cleaner CLEANER
      • SIZE_BYTE

        static final long SIZE_BYTE
      • SIZE_DOUBLE

        static final long SIZE_DOUBLE
      • SIZE_FLOAT

        static final long SIZE_FLOAT
      • SIZE_INT

        static final long SIZE_INT
      • SIZE_LONG

        static final long SIZE_LONG
      • SIZE_SHORT

        static final long SIZE_SHORT
      • UNSAFE

        static final sun.misc.Unsafe UNSAFE
    • Constructor Detail

      • NativeMemory

        public NativeMemory()
    • Method Detail

      • allocateByteArray

        public static long allocateByteArray​(java.lang.Object owner,
                                             long count)
      • allocateDoubleArray

        public static long allocateDoubleArray​(java.lang.Object owner,
                                               long count)
      • allocateFloatArray

        public static long allocateFloatArray​(java.lang.Object owner,
                                              long count)
      • allocateIntArray

        public static long allocateIntArray​(java.lang.Object owner,
                                            long count)
      • allocateLongArray

        public static long allocateLongArray​(java.lang.Object owner,
                                             long count)
      • allocateShortArray

        public static long allocateShortArray​(java.lang.Object owner,
                                              long count)
      • fillByteArray

        public static void fillByteArray​(long basePointer,
                                         long count,
                                         byte value)
      • fillDoubleArray

        public static void fillDoubleArray​(long basePointer,
                                           long count,
                                           double value)
      • fillFloatArray

        public static void fillFloatArray​(long basePointer,
                                          long count,
                                          float value)
      • fillIntArray

        public static void fillIntArray​(long basePointer,
                                        long count,
                                        int value)
      • fillLongArray

        public static void fillLongArray​(long basePointer,
                                         long count,
                                         long value)
      • fillShortArray

        public static void fillShortArray​(long basePointer,
                                          long count,
                                          short value)
      • getAddressOf

        public static long getAddressOf​(java.nio.Buffer buffer)
      • getByte

        public static byte getByte​(long address)
      • getByte

        public static byte getByte​(long basePointer,
                                   long index)
      • getChar

        public static char getChar​(long address)
      • getDouble

        public static double getDouble​(long address)
      • getDouble

        public static double getDouble​(long basePointer,
                                       long index)
      • getFloat

        public static float getFloat​(long address)
      • getFloat

        public static float getFloat​(long basePointer,
                                     long index)
      • getInt

        public static int getInt​(long address)
      • getInt

        public static int getInt​(long basePointer,
                                 long index)
      • getLong

        public static long getLong​(long address)
      • getLong

        public static long getLong​(long basePointer,
                                   long index)
      • getShort

        public static short getShort​(long address)
      • getShort

        public static short getShort​(long basePointer,
                                     long index)
      • initialiseByteArray

        public static void initialiseByteArray​(long basePointer,
                                               long count)
      • initialiseDoubleArray

        public static void initialiseDoubleArray​(long basePointer,
                                                 long count)
      • initialiseFloatArray

        public static void initialiseFloatArray​(long basePointer,
                                                long count)
      • initialiseIntArray

        public static void initialiseIntArray​(long basePointer,
                                              long count)
      • initialiseLongArray

        public static void initialiseLongArray​(long basePointer,
                                               long count)
      • initialiseShortArray

        public static void initialiseShortArray​(long basePointer,
                                                long count)
      • setByte

        public static void setByte​(long basePointer,
                                   long index,
                                   byte value)
      • setDouble

        public static void setDouble​(long basePointer,
                                     long index,
                                     double value)
      • setFloat

        public static void setFloat​(long basePointer,
                                    long index,
                                    float value)
      • setInt

        public static void setInt​(long basePointer,
                                  long index,
                                  int value)
      • setLong

        public static void setLong​(long basePointer,
                                   long index,
                                   long value)
      • setShort

        public static void setShort​(long basePointer,
                                    long index,
                                    short value)
      • allocate

        static long allocate​(java.lang.Object owner,
                             long bytes)