Repository: spark
Updated Branches:
  refs/heads/master b2074b664 -> 083de00cb


[SPARK-17127] Make unaligned access in unsafe available for AArch64

## # What changes were proposed in this pull request?

>From the spark of version 2.0.0 , when MemoryMode.OFF_HEAP is set , whether 
>the architecture supports unaligned access or not is checked. If the check 
>doesn't pass, exception is raised.

We know that AArch64 also supports unaligned access , but now only i386, x86, 
amd64, and X86_64 are included.

I think we should include aarch64 when performing the check.

## How was this patch tested?

Unit test suite

Author: Richael <richael.zhu...@arm.com>

Closes #14700 from yimuxi/zym_change_unsafe.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/083de00c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/083de00c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/083de00c

Branch: refs/heads/master
Commit: 083de00cb608a7414aae99a639825482bebfea8a
Parents: b2074b6
Author: Richael <richael.zhu...@arm.com>
Authored: Mon Aug 22 09:01:50 2016 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Mon Aug 22 09:01:50 2016 +0100

----------------------------------------------------------------------
 common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/083de00c/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java
----------------------------------------------------------------------
diff --git a/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java 
b/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java
index a2ee45c..c892b9c 100644
--- a/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java
+++ b/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java
@@ -55,7 +55,7 @@ public final class Platform {
       // We at least know x86 and x64 support unaligned access.
       String arch = System.getProperty("os.arch", "");
       //noinspection DynamicRegexReplaceableByCompiledPattern
-      _unaligned = arch.matches("^(i[3-6]86|x86(_64)?|x64|amd64)$");
+      _unaligned = arch.matches("^(i[3-6]86|x86(_64)?|x64|amd64|aarch64)$");
     }
     unaligned = _unaligned;
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to