aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRichael <Richael.Zhuang@arm.com>2016-08-22 09:01:50 +0100
committerSean Owen <sowen@cloudera.com>2016-08-22 09:01:50 +0100
commit083de00cb608a7414aae99a639825482bebfea8a (patch)
tree5b9ec2c0968e375442d8a8d4d34224f783b05f5c /common
parentb2074b664a9c269c4103760d40c4a14e7aeb1e83 (diff)
downloadspark-083de00cb608a7414aae99a639825482bebfea8a.tar.gz
spark-083de00cb608a7414aae99a639825482bebfea8a.tar.bz2
spark-083de00cb608a7414aae99a639825482bebfea8a.zip
[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.Zhuang@arm.com> Closes #14700 from yimuxi/zym_change_unsafe.
Diffstat (limited to 'common')
-rw-r--r--common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java2
1 files changed, 1 insertions, 1 deletions
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 a2ee45c37e..c892b9cdaf 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;
}