Examples of copyMemory()


Examples of sun.misc.Unsafe.copyMemory()

        // allocate new memory for copy
        ByteBuffer clone = ByteBuffer.allocateDirect(buff.capacity());
        long src = ((DirectBuffer) buff).address();
        long dst = ((DirectBuffer) clone).address();
        // memcpy
        unsafe.copyMemory(src, dst, buff.capacity());
        return new ForeignBufferDoubleArray(clone, rows, cols);
    }

    @Override
    public IDoubleArray create(int size)
View Full Code Here

Examples of sun.misc.Unsafe.copyMemory()

        Sample other = new Sample();

        long pos = cl.getFieldInfo("x", Sample.class).getMemOffset();
        long siz = cl.getFieldInfo("s", Sample.class).getMemOffset()+8;
        byte b[] = new byte[(int) siz];
        un.copyMemory(test,0, b, 0, siz);

        other = copyObj(un,test, (int) siz);

    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.