You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/01/11 13:22:41 UTC

[07/25] ignite git commit: Merge remote-tracking branch 'origin/ignite-11810' into ignite-11810

Merge remote-tracking branch 'origin/ignite-11810' into ignite-11810

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3bb44079
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3bb44079
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3bb44079

Branch: refs/heads/ignite-gg-11810
Commit: 3bb4407951a9565c449383800ca1607d017c092f
Parents: 664ceac 6f1ed0d
Author: sboikov <sb...@gridgain.com>
Authored: Fri Dec 23 14:20:54 2016 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Dec 23 14:20:54 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/pagemem/PageUtils.java   | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3bb44079/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageUtils.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageUtils.java
index b6faeb1,d4ca73d..7ba452b
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageUtils.java
@@@ -29,18 -29,18 +29,30 @@@ public class PageUtils 
      private static final Unsafe unsafe = GridUnsafe.UNSAFE;
  
      public static byte getByte(long buf, int off) {
 -        return unsafe.getByte(buf, off);
 +        return unsafe.getByte(buf + off);
 +    }
 +
 +    public static byte[] getBytes(long buf, int off, int len) {
 +        byte[] bytes = new byte[len];
 +
 +        unsafe.copyMemory(null, buf + off, bytes, GridUnsafe.BYTE_ARR_OFF, len);
 +
 +        return bytes;
 +    }
 +
 +    public static void getBytes(long src, int srcOff, byte[] dst, int dstOff, int len) {
++        unsafe.copyMemory(null, src + srcOff, dst, GridUnsafe.BYTE_ARR_OFF + dstOff, len);
+     }
+ 
+     public static byte[] getBytes(long buf, int off, int len) {
+         byte[] bytes = new byte[len];
+ 
+         unsafe.copyMemory(null, buf + off, bytes, GridUnsafe.BYTE_ARR_OFF, len);
+ 
+         return bytes;
+     }
+ 
+     public static void getBytes(long src, int srcOff, byte[] dst, int dstOff, int len) {
          unsafe.copyMemory(null, src + srcOff, dst, GridUnsafe.BYTE_ARR_OFF + dstOff, len);
      }